Method and device for interpolating images by using a smoothing interpolation filter

ABSTRACT

Provided are a method of interpolating an image by determining interpolation filter coefficients, and an apparatus for performing the same. The method includes: differently selecting an interpolation filter, from among interpolation filters for generating at least one sub-pel-unit pixel value located between integer-pel-unit pixels, based on a sub-pel-unit interpolation location and a smoothness; and generating the at least one sub-pel-unit pixel value by interpolating, using the selected interpolation filter, pixel values of the integer-pel-unit pixels.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No.13/877,074, filed on Mar. 29, 2013, which is a National Stageapplication under 35 U.S.C. §371 of International Application No.PCT/KR2011/007220, filed on Sep. 30, 2011, which claims the benefit ofU.S. Provisional Application No. 61/388,264, filed on Sep. 30, 2010 inthe United States Patent and Trademark Office (USPTO), U.S. ProvisionalApplication No. 61/426,479, filed on Dec. 22, 2010 in the USPTO, U.S.Provisional Application No. 61/431,909, filed on Jan. 12, 2011 in theUSPTO, and U.S. Provisional Application No. 61/450,775, filed on Mar. 9,2011 in the USPTO, the disclosures of which are incorporated herein byreference in their entireties.

BACKGROUND

1. Field

Apparatuses and methods consistent with exemplary embodiments relate toprediction encoding using motion compensation.

2. Description of the Related Art

In related art image encoding and decoding methods, in order to encodean image, one picture is split into macro blocks. After that, predictionencoding is performed on each macro block by using inter prediction orintra prediction.

Inter prediction refers to a method of compressing an image by removingtemporal redundancy between pictures and a representative examplethereof is motion estimation encoding. In motion estimation encoding,each block of a current picture is predicted by using at least onereference picture. A reference block that is most similar to a currentblock is found within a predetermined search range by using apredetermined evaluation function.

A current block is predicted based on a reference block, and a residualblock obtained by subtracting, from the current block, a predictionblock generated as a prediction result is encoded. In this case, inorder to more accurately perform prediction, interpolation is performedon a range of searching the reference picture, sub-pel-unit pixelssmaller than integer-pel-unit pixels are generated, and inter predictionis performed on the generated sub-pel-unit pixels.

SUMMARY

One or more exemplary embodiments provide a method and apparatus fordetermining appropriate interpolation filter coefficients inconsideration of image characteristics so as to generate a sub-pel-unitpixel by interpolating integer-pel-unit pixels.

According to an aspect of an exemplary embodiment, there is provided amethod of interpolating an image in consideration of smoothing, themethod including: differently selecting an interpolation filter based ona sub-pel-unit interpolation location and a smoothness from amonginterpolation filters for generating at least one sub-pel-unit pixelvalue located between integer-pel-unit pixels; and generating the atleast one sub-pel-unit pixel value by interpolating pixel values of theinteger-pel-unit pixels by using the selected interpolation filter.

The interpolation filter may include filter coefficients fortransforming the integer-pel-unit pixels based on a plurality of basisfunctions and inversely transforming a plurality of coefficientsgenerated as a result of the transforming.

The interpolation filter may include filter coefficients having thesmoothness determined based on a distance between the interpolationlocation and the integer-pel-unit pixels.

The interpolation filters may include filter coefficients having thesmoothness determined based on a distance between the interpolationlocation and integer-pel-unit pixels adjacent to the interpolationlocation.

In order to interpolate the integer-pel-unit pixels in a spatial domain,the interpolation filter may include filter coefficients obtained bycombining a filter for performing transformation and inversetransformation using the plurality of basis functions, and a windowfunction, and the window function may be symmetric with respect to theinterpolation location.

In order to interpolate the integer-pel-unit pixels in a spatial domain,the interpolation filter may include filter coefficients obtained bycombining a filter for performing transformation and inversetransformation using the plurality of basis functions, and a smoothingparameter, and the smoothing parameter may control at least one of asmoothing speed and a smoothing range.

The interpolation filter may include filter coefficients based on aspline function. The interpolation filter may include filtercoefficients for maximizing a low-frequency response of theinterpolation filter based on a polynomial function.

The selecting of the interpolation filter may include selecting aninterpolation filter including filter coefficients scaled to integers,from among the interpolation filters, and the generating of the at leastone sub-pel-unit pixel value may include normalizing the at least onesub-pel-unit pixel value generated by using the selected interpolationfilter, based on a scaling factor.

The selecting of the interpolation filter may include differentlyselecting an interpolation filter based on pixel characteristics fromamong the interpolation filters, and the generating of the at least onesub-pel-unit pixel value may include generating the at least onesub-pel-unit pixel value by using the interpolation filter differentlyselected based on the pixel characteristics.

According to an aspect of another exemplary embodiment, there isprovided an apparatus for interpolating an image in consideration ofsmoothing, the apparatus including: a filter selector for differentlyselecting an interpolation filter based on a sub-pel-unit interpolationlocation and a smoothness from among interpolation filters forgenerating at least one sub-pel-unit pixel value located betweeninteger-pel-unit pixels; and an interpolator for generating the at leastone sub-pel-unit pixel value by interpolating pixel values of theinteger-pel-unit pixels by using the selected interpolation filter.

According to an aspect of another exemplary embodiment, there isprovided a method of interpolating an image in consideration of a colorcomponent, the method including: differently selecting an interpolationfilter based on a sub-pel-unit interpolation location and a colorcomponent of a current pixel from among interpolation filters forgenerating at least one sub-pel-unit pixel value located betweeninteger-pel-unit pixels; and generating the at least one sub-pel-unitpixel value by interpolating pixel values of the integer-pel-unit pixelsby using the selected interpolation filter.

The selecting of the interpolation filter may include, in order tointerpolate a chroma pixel, selecting an interpolation filter having asmoothness stronger than that of an interpolation filter for a lumapixel, from among the interpolation filters.

The interpolation filter having a smoothness stronger than that of theinterpolation filter for a luma pixel may be one of a filter includingfilter coefficients for smoothing the integer-pel-unit pixels,transforming the smoothed integer-pel-unit pixels by using a pluralityof basis functions, and inversely transforming a plurality ofcoefficients generated as a result of the transforming; a filterobtained by combining filter coefficients for performing transformationand inverse transformation by using the plurality of basis functions,and window function coefficients for performing low pass filtering; afilter including filter coefficients for most strongly smoothingboundary integer-pel-unit pixels based on a boundary condition of aspline function; and a filter including filter coefficients formaximizing a low-frequency response of an interpolation filter based ona polynomial function.

According to an aspect of another exemplary embodiment, there isprovided an apparatus for interpolating an image in consideration of acolor component, the apparatus including: a filter selector fordifferently selecting an interpolation filter based on a sub-pel-unitinterpolation location and a color component of a current pixel fromamong interpolation filters for generating at least one sub-pel-unitpixel value located between integer-pel-unit pixels; and an interpolatorfor generating the at least one sub-pel-unit pixel value byinterpolating pixel values of the integer-pel-unit pixels by using theselected interpolation filter.

According to an aspect of another exemplary embodiment, there isprovided a video encoder using an image interpolation filter, the videoencoder including: an encoder for differently selecting an interpolationfilter based on a sub-pel-unit interpolation location and a smoothnessfrom among interpolation filters stored in the video encoder, withrespect to each block of an input picture, performing predictionencoding to generate at least one sub-pel-unit pixel value byinterpolating pixel values of integer-pel-unit pixels by using theselected interpolation filter, and performing transformation andquantization on a prediction result of the prediction encoding; anoutput unit for outputting a bitstream generated by performing entropyencoding on quantized transformation coefficients and encodinginformation; and a storage for storing filter coefficients of theinterpolation filters.

According to an aspect of another exemplary embodiment, there isprovided a video decoder using an image interpolation filter, the videodecoder including: a receiver and extractor for receiving an encodedbitstream of a video and extracting encoding information and encodeddata of a picture of the video by performing entropy decoding andparsing on the bitstream; a decoder for performing inverse quantizationand inverse transformation on quantized transformation coefficients ofthe encoded data of a current block of the picture, differentlyselecting an interpolation filter based on a sub-pel-unit interpolationlocation and a smoothness from among interpolation filters stored in thevideo decoder, performing prediction decoding to generate at least onesub-pel-unit pixel value by interpolating pixel values ofinteger-pel-unit pixels by using the selected interpolation filter, andreconstructing the picture; and a storage for storing filtercoefficients of the interpolation filters.

According to an aspect of another exemplary embodiment, there isprovided a computer-readable recording medium having recorded thereon acomputer program for executing the above method.

When a video is encoded and decoded, since a high-quality image isgenerated by interpolating a reference frame and motion estimation andcompensation are performed based on the high-quality image, the accuracyof inter prediction may be increased. Also, since a smoothinginterpolation filter is used to reduce high-frequency components in aninterpolation result and thus a smoother interpolation result isobtained, high-frequency components may be removed and the efficiency ofimage encoding and image decoding may be improved.

DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an image interpolation apparatus accordingto an exemplary embodiment;

FIG. 2 is a diagram for describing a relationship between an integer-pelunit and a sub-pel unit;

FIG. 3 is a diagram illustrating adjacent integer-pel-unit pixels to bereferred to so as to determine a sub-pel-unit pixel value, according toan exemplary embodiment;

FIGS. 4A through 4C are diagrams illustrating examples ofinteger-pel-unit pixels to be referred to so as to determine asub-pel-unit pixel value, according to an exemplary embodiment;

FIG. 5 is a graph of a smoothing parameter of a smoothing interpolationfilter, according to an exemplary embodiment;

FIG. 6 is a graph of a spline function usable by a smoothinginterpolation filter, according to an exemplary embodiment;

FIG. 7 is a flowchart of an image interpolation method according to anexemplary embodiment;

FIGS. 8A through 8C are tables showing filter coefficients of 12-tapinterpolation filters determined based on a smoothing parameter and aninterpolation location, according to exemplary embodiments;

FIGS. 9A through 9C are tables showing filter coefficients of 6-tapinterpolation filters determined based on a smoothing parameter and aninterpolation location, according to exemplary embodiments;

FIG. 10 is a table showing filter coefficients of 6-tap interpolationfilters determined for chroma pixels based on a smoothing parameter andan interpolation location, according to an exemplary embodiment;

FIG. 11 is a table showing filter coefficients of smoothinginterpolation filters differently determined based on a color componentand an image interpolation location, according to an exemplaryembodiment;

FIGS. 12A through 12C are tables showing filter coefficients ofsmoothing interpolation filters based on an image interpolation locationand a scaling factor, according to exemplary embodiments;

FIG. 13A is a block diagram of a video encoding apparatus using asmoothing interpolation filter, according to an exemplary embodiment;

FIG. 13B is a block diagram of a video decoding apparatus using asmoothing interpolation filter, according to an exemplary embodiment;

FIG. 14A is a flowchart of an image encoding method using a smoothinginterpolation filter, according to an exemplary embodiment;

FIG. 14B is a flowchart of an image decoding method using a smoothinginterpolation filter, according to an exemplary embodiment;

FIG. 15 is a diagram for describing a concept of coding units accordingto an exemplary embodiment;

FIG. 16 is a block diagram of an image encoder based on coding units,according to an exemplary embodiment;

FIG. 17 is a block diagram of an image decoder based on coding units,according to an exemplary embodiment;

FIG. 18 is a diagram illustrating deeper coding units according todepths, and partitions, according to an exemplary embodiment;

FIG. 19 is a diagram for describing a relationship between a coding unitand transformation units, according to an exemplary embodiment;

FIG. 20 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment;

FIG. 21 is a diagram of deeper coding units according to depths,according to an exemplary embodiment;

FIGS. 22 through 24 are diagrams for describing a relationship betweencoding units, prediction units, and transformation units, according toan exemplary embodiment;

FIG. 25 is a diagram for describing a relationship between a codingunit, a prediction unit or a partition, and a transformation unit,according to coding mode information of Table 1;

FIG. 26 is a flowchart of a video encoding method using a smoothinginterpolation filter based on coding units having a tree structure,according to an exemplary embodiment; and

FIG. 27 is a flowchart of a video decoding method using a smoothinginterpolation filter based on coding units having a tree structure,according to an exemplary embodiment.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

The description below and the attached drawings are provided to gain anunderstanding of operations according to exemplary embodiments.Descriptions of elements or operations that may be easily implemented byone of ordinary skill in the art may be omitted.

The description and the drawings are not provided for limitation, andthe scope of the inventive concept should be defined by the appendedclaims. The meaning of the terms used in the present specification andclaims should be construed as meanings and concepts not departing fromthe spirit and scope of the inventive concept based on the principlethat the inventor is capable of defining concepts of terms in order todescribe exemplary embodiments in the most appropriate way.

Hereinafter, exemplary embodiments will be described with reference tothe attached drawings.

In the following description, an ‘image’ may comprehensively refer to amoving image such as a video, as well as a still image.

Image interpolation considering smoothing, according to an exemplaryembodiment, is disclosed with reference to FIGS. 1 through 3, 4A through4C, 5 through 7, 8A through 8C, 9A through 9C, 10, 11, and 12A through12C. Also, video encoding and decoding using a smoothing interpolationfilter, according to an exemplary embodiment, are disclosed withreference to FIGS. 13A, 13B, 14A, 14B, and 15 through 27. Specifically,video encoding and decoding using a smoothing interpolation filter basedon coding units having a tree structure, according to an exemplaryembodiment, are disclosed with reference to FIGS. 15 through 27.

Image interpolation considering smoothing and a smoothing interpolationfilter, according to exemplary embodiments, will now be described indetail with reference to FIGS. 1 through 3, 4A through 4C, 5 through 7,8A through 8C, 9A through 9C, 10, 11, and 12A through 12C.

FIG. 1 is a block diagram of an image interpolation apparatus 10according to an exemplary embodiment.

The image interpolation apparatus 10 considering smoothing includes afilter selector 12 and an interpolator 14. Operations of the filterselector 12 and the interpolator 14 of the image interpolation apparatus10 may be cooperatively controlled by a video encoding processor, acentral processing unit (CPU), and a graphic processor.

The image interpolation apparatus 10 may receive an input image and maygenerate sub-pel-unit pixel values by interpolating integer-pel-unitpixels. The input image may be a picture sequence, a picture, a frame,or blocks of a video.

The filter selector 12 may differently select an interpolation filterfor generating at least one sub-pel-unit pixel value located betweeninteger-pel units, based on a sub-pel-unit interpolation location and asmoothness.

The interpolator 14 may interpolate integer-pel-unit pixels adjacent tothe sub-pel-unit interpolation location by using the interpolationfilter selected by the filter selector 12, thereby generatingsub-pel-unit pixel values. Interpolation filtering of integer-pel-unitpixels to generate sub-pel-unit pixel values may include interpolationfiltering of integer-pel-unit reference pixel values includinginteger-pel-unit pixels adjacent to the sub-pel-unit interpolationlocation in a region supported by the interpolation filter.

An interpolation filter according to an exemplary embodiment may includefilter coefficients for transforming integer-pel-unit reference pixelsbased on a plurality of basis functions, and for inversely transforminga plurality of coefficients generated as a transformation result.

The interpolation filter may be a one-dimensional filter or atwo-dimensional filter. If the selected interpolation filter is aone-dimensional filter, the interpolator 14 may sequentially performfiltering by using one-dimensional interpolation filters in two or moredirections, thereby generating a current sub-pel-unit pixel value.

A smoothing interpolation filter according to an exemplary embodimentmay have a smoothness determined based on a distance between aninterpolation location and integer-pel-unit pixels.

An interpolation filter according to an exemplary embodiment may includedifferent filter coefficients based on a sub-pel-unit interpolationlocation and a smoothness. Hereinafter, an interpolation filterdetermined in consideration of a sub-pel-unit interpolation location anda smoothness is referred to as a smoothing interpolation filter.

A smoothing interpolation filter according to an exemplary embodimentmay have a smoothness determined based on a distance between aninterpolation location and integer-pel-unit pixels adjacent to theinterpolation location.

Also, the smoothing interpolation filter may include filter coefficientsfor more strongly smoothing integer-pel-unit reference pixels away fromthe interpolation location.

In order to interpolate integer-pel-unit pixels in a spatial domain, thesmoothing interpolation filter may be obtained by combining filtercoefficients for performing transformation and inverse transformation byusing a plurality of basis functions, and window function coefficientsfor performing low pass filtering.

A window function according to an exemplary embodiment may be symmetricwith respect to an interpolation location. The smoothing interpolationfilter obtained by combining filter coefficients for performingtransformation and inverse transformation and window functioncoefficients for performing low pass filtering may include filtercoefficients for giving a large weight to a integer-pel-unit referencepixel close to the interpolation location and giving a small weight to ainteger-pel-unit reference pixel away from the interpolation location.

The smoothing interpolation filter may include filter coefficients forsmoothing integer-pel-unit reference pixels, transforming the smoothedinteger-pel-unit reference pixels by using a plurality of basisfunctions, and inversely transforming a plurality of coefficientsgenerated as a transformation result.

The smoothing interpolation filter is an interpolation filter in aspatial domain, and may include filter coefficients obtained bycombining an interpolation filter for performing transformation andinverse transformation, and a smoothing parameter. The smoothingparameter may control at least one of a smoothing speed and a smoothingrange.

The smoothing interpolation filter may include filter coefficients basedon a spline function. That is, a basis function of transformation andinverse transformation for determining interpolation filter coefficientsmay be a spline function. In order to obtain a smoother interpolationresult, the smoothing interpolation filter may include filtercoefficients determined by using a spline function.

According to an exemplary embodiment, a smoothing interpolation filterbased on a spline function may include filter coefficients for moststrongly smoothing boundary integer-pel-unit reference pixels based on aboundary condition of the spline function.

According to another exemplary embodiment, if a basis function oftransformation and inverse transformation is a polynomial function, asmoothing interpolation filter may include filter coefficients formaximizing a low-frequency response of an interpolation filter based onthe polynomial function.

A smoothing interpolation filter according to an exemplary embodimentmay include different filter coefficients based on a filter length aswell as a sub-pel-unit interpolation location and a smoothness.

Also, the smoothing interpolation filter may include different filtercoefficients based on a scaling factor of an interpolation result aswell as a sub-pel-unit interpolation location, a smoothness, and afilter length. The filter selector 12 may select a smoothinginterpolation filter including filter coefficients scaled to integers.The interpolator 14 normalizes pixel values generated by using thesmoothing interpolation filter selected by the filter selector 12.

Also, the filter selector 12 may differently select an interpolationfilter based on pixel characteristics. The interpolator 14 may generatesub-pel-unit pixel values by using the interpolation filter differentlyselected based on pixel characteristics.

The interpolation filter selectable by the filter selector 12 mayinclude a smoothing interpolation filter and a general interpolationfilter that does not consider smoothing. Thus, based on imagecharacteristics, the filter selector 12 may select a generalinterpolation filter that does not consider smoothing at all.

For example, according to another exemplary embodiment, the imageinterpolation apparatus 10 may perform image interpolation by usingdifferent interpolation filters according to color components.

According to another exemplary embodiment, the filter selector 12 maydifferently select an interpolation filter based on the sub-pel-unitinterpolation location and a color component of a current pixel.According to another exemplary embodiment, the interpolator 14 mayinterpolate integer-pel-unit pixels by using the selected interpolationfilter, thereby generating at least one sub-pel-unit pixel value.

For example, the filter selector 12 may differently determine aninterpolation filter for a luma component and an interpolation filterfor a chroma component.

In order to interpolate a chroma pixel, the filter selector 12 mayselect a smoothing interpolation filter having a stronger smoothnessthan that of an interpolation filter for a luma pixel.

For example, in order to interpolate a chroma pixel, an interpolationfilter including filter coefficients determined based on a splinefunction or an interpolation filter including filter coefficientsdetermined based on a polynomial function may be selected. The filtercoefficients determined based on a spline function may most stronglysmooth boundary integer-pel-unit pixels based on a boundary condition ofthe spline function. The interpolation filter determined based on apolynomial function may include filter coefficients for maximizing alow-frequency response.

Also, in order to interpolate a chroma pixel, an interpolation filterincluding filter coefficients determined based on a smoothing parameterhaving a stronger smoothness than that of an interpolation filter for aluma pixel, or an interpolation filter including filter coefficientscombined with a window function for removing more high-frequencycomponents than an interpolation filter for a luma pixel may beselected.

In order to obtain a smooth interpolation result of a chroma component,a smoothing interpolation filter obtained by combining filtercoefficients for performing transformation and inverse transformationbased on a plurality of basis functions, and window functioncoefficients for performing low pass filtering may be selected.

Image interpolation is used to transform a low-quality image into ahigh-quality image, to transform an interlaced image into a progressiveimage, or to up-sample a low-quality image into a high-quality image.Also, when a video encoding apparatus encodes an image, a motionestimator and compensator may perform inter prediction by using aninterpolated reference frame. The accuracy of inter prediction may beincreased by interpolating a reference frame to generate a high-qualityimage, and performing motion estimation and compensation based on thehigh-quality image. Similarly, when an image decoding apparatus decodesan image, a motion compensator may perform motion compensation by usingan interpolated reference frame, thereby increasing the accuracy ofinter prediction.

Also, the smoothing interpolation filter used by the image interpolationapparatus 10 may obtain a smooth interpolation result by reducinghigh-frequency components in an interpolation result using aninterpolation filter. Since the high-frequency components reduce theefficiency of image compression, the efficiency of image encoding anddecoding may also be improved by performing smoothness-adjustable imageinterpolation.

FIG. 2 is a diagram for describing a relationship between an integer-pelunit and a sub-pel unit.

Referring to FIG. 2, the image interpolation apparatus 10 generatespixel values of locations ‘X’ by interpolating integer-pel-unit pixelvalues of locations ‘O’ of a predetermined block 20 in a spatial domain.The pixel values of the locations ‘X’ are sub-pel-unit pixel values ofinterpolation locations determined by αx and αy. Although FIG. 2illustrates that the predetermined block 20 is a 4×4 block, it will beeasily understood by one of ordinary skill in the art that the blocksize is not limited to 4×4 and may be greater or smaller than 4×4.

In video processing, a motion vector is used to perform motioncompensation and prediction on a current image. Based on predictionencoding, a previously decoded image is referred to so as to predict acurrent image, and a motion vector indicates a predetermined point of areference image. Therefore, a motion vector indicates aninteger-pel-unit pixel of a reference image.

However, a pixel to be referred to by a current image may be locatedbetween integer-pel-unit pixels of a reference image. Such a location isreferred to as a sub-pel-unit location. Since a pixel does not exist ata sub-pel-unit location, a sub-pel-unit pixel value is merely predictedby using integer-pel-unit pixel values. In other words, a sub-pel-unitpixel value is estimated by interpolating integer-pel-unit pixels.

A method of interpolating integer-pel-unit pixels will now be describedin detail with reference to FIGS. 3, and 4A through 4C.

FIG. 3 is a diagram illustrating adjacent integer-pel-unit pixels to bereferred to so as to determine a sub-pel-unit pixel value, according toan exemplary embodiment.

Referring to FIG. 3, the image interpolation apparatus 10 generates asub-pel-unit pixel value 35 of an interpolation location byinterpolating integer-pel-unit pixel values 31 and 33 in a spatialdomain. The interpolation location is determined by α.

FIGS. 4A through 4C are diagrams illustrating examples ofinteger-pel-unit pixels to be referred to so as to determine asub-pel-unit pixel value, according to an exemplary embodiment.

Referring to FIG. 4A, in order to generate the sub-pel-unit pixel value35 by interpolating the two integer-pel-unit pixel values 31 and 33, aplurality of adjacent integer-pel-unit pixels values 37 and 39 includingthe integer-pel-unit pixel values 31 and 33 are used. In other words,0th and 1st pixels may be interpolated by performing one-dimensionalinterpolation filtering on 2M pixel values from an −(M−1)th pixel valueto an Mth pixel value.

Also, although FIG. 4A illustrates that pixel values in a horizontaldirection are interpolated, one-dimensional interpolation filtering maybe performed by using pixel values in a vertical or diagonal direction.

Referring to FIG. 4B, a pixel value P(α) of an interpolation location αmay be generated by interpolating pixels P₀ 41 and P₁ 43 that areadjacent to each other in a vertical direction. When FIGS. 4A and 4B arecompared, their interpolation filtering methods are similar and the onlydifference therebetween is that pixel values 47 and 49 aligned in avertical direction are interpolated in FIG. 4B while the pixel values 37and 39 aligned in a horizontal direction are interpolated in FIG. 4A.

Referring to FIG. 4C, similarly, a pixel value 44 of the interpolationlocation α is generated by interpolating two adjacent pixel values 40and 42. The only difference from FIG. 4A is that pixel values 46 and 48aligned in a diagonal direction are used instead of the pixel values 37and 39 aligned in a horizontal direction.

In addition to the directions shown in FIGS. 4A through 4C,one-dimensional interpolation filtering may be performed in variousdirections.

Interpolation filtering may be performed to interpolate integer-pel-unitpixels for generating a sub-pel-unit pixel value. The interpolationfiltering may be represented by the following equation.p(α)=f(α)=p=Σ _(−M+1) ^(M) f _(m) ·p _(m)

A pixel value p(x) is generated by performing interpolation based on adot product of a vector p of 2M integer-pel-unit reference pixels{p_(m)}={p_(−M+1), P_(−M+2), . . . , p₀, p₁, . . . , p_(M)} and a vectorf(x) of filter coefficients {f_(m)}={f_(−M+1), f_(−M+2), . . . , f₀, f₁,. . . , f_(M)}. Since a filter coefficient f(α) varies based on theinterpolation location α and a pixel value p(α) obtained by performinginterpolation is determined based on the filter coefficient f(α), aselected interpolation filter, i.e., the determined filter coefficientf(x), greatly influences the performance of interpolation filtering.

Image interpolation using transformation and inverse transformationbased on basis functions, and a method of determining an interpolationfilter will now be described in detail.

An interpolation filter using transformation and inverse transformationinitially transforms pixel values by using a plurality of basisfunctions having different frequency components. Transformation mayinclude all types of transformation from pixel values in a spatialdomain into coefficients in a transformation domain, and may be discretecosine transformation (DCT). Integer-pel-unit pixel values aretransformed by using a plurality of basis functions. A pixel value maybe a luma pixel value or a chroma pixel value. Basis functions are notlimited to particular basis functions and may include all basisfunctions for transforming pixel values in a spatial domain into pixelvalues in a transformation domain. For example, a basis function may bea cosine or sine function for performing DCT and inverse DCT (IDCT).Alternatively, various basis functions such as a spline function and apolynomial function may be used. Also, DCT may be modified DCT (MDCT) orMDCT with windowing.

The interpolation filter using transformation and inverse transformationshifts phases of the basis functions used to perform transformation andinversely transforms values of a plurality of coefficients generated byusing the phase-shifted basis functions, i.e., values in atransformation domain. As an inverse transformation result, pixel valuesin a spatial domain are output and the output values may be pixel valuesof an interpolation location.

<Filter Coefficients Using Orthogonal Transformation and InverseTransformation Based on Orthogonal Basis Functions>

A case when the interpolator 14 performs interpolation filtering usingtransformation and inverse transformation based on orthogonal basisfunctions will now be described in detail. Specifically, DCT isdescribed as an example of the transformation.

For example, referring to FIG. 4A, in order to generate the sub-pel-unitpixel value 35 by interpolating the two integer-pel-unit pixel values 31and 33, by using a plurality of adjacent integer-pel-unit pixels values37 and 39 including the integer-pel-unit pixel values 31 and 33, 0th and1st pixels may be interpolated by performing one-dimensional DCT on 2Mpixel values from an −(M−1)th pixel value to an Mth pixel value, andperforming one-dimensional IDCT based on phase-shifted basis functions.

The interpolator 14 initially performs one-dimensional DCT oninteger-pel-unit pixel values. One-dimensional DCT may be performed asrepresented in Equation 1.

$\begin{matrix}{{C_{k} = {\frac{1}{M}{\sum\limits_{l = {{- M} + 1}}^{M}{{p(l)}{\cos\left( \frac{\left( {{2\; l} - 1 + {2\; M}} \right)k\;\pi}{4M} \right)}}}}},{0 \leq k \leq {{2\; M} - 1}}} & \left\lbrack {{Equation}\mspace{14mu} 1} \right\rbrack\end{matrix}$

where p(l) represents the pixel values 37 and 39 from an −(M−1)th pixelvalue to an Mth pixel value, and Ck represents a plurality ofcoefficients in a frequency domain, which are generated by performingone-dimensional DCT on the pixel values 37 and 39. In this case, k is apositive integer that satisfies the above condition of Equation 1.

After one-dimensional DCT is performed on the pixel values 37 and 39 byusing Equation 1, the interpolator 14 performs inverse transformation onthe coefficients as represented in Equation 2.

$\begin{matrix}{{P(\alpha)} = {\frac{C_{0}}{2} + {\sum\limits_{k = 1}^{{2\; M} - 1}{C_{k}{\cos\left( \frac{\left( {{2\alpha} - 1 + {2\; M}} \right)k\;\pi}{4\; M} \right)}}}}} & \left\lbrack {{Equation}\mspace{14mu} 2} \right\rbrack\end{matrix}$

where α represents an interpolation location between two pixel values asillustrated in FIG. 13, and may have various fractional values such as½, ¼, ¾, ⅛, ⅜, ⅝, ⅞, 1/16, etc. The fractional value is not limited to aparticular value, and a may be a real value instead of a fractionalvalue. P(α) represents the sub-pel-unit pixel value 35 of theinterpolation location α, which is generated as a one-dimensional IDCTresult.

When Equation 2 is compared to Equation 1, the phase of a cosinefunction that is a basis function used to perform IDCT is determinedbased on a fractional number a instead of an integer 1, and thus isdifferent from the phase of a basis function used to performone-dimensional DCT. In other words, the phase of each basis functionused to perform inverse transformation, i.e., a cosine function, isshifted based on 2α. If the interpolator 14 performs IDCT based on thephase-shifted cosine functions according to Equation 2, the sub-pel-unitpixel value 35 of the interpolation location α, i.e., P(α), isgenerated.

DCT according to Equation 1 is expressed by a matrix equationrepresented in Equation 3.C=D×REF  [Equation 3]

Here, C is a 2M×1 matrix of the 2M coefficients described above inrelation to Equation 1, and REF is a 2M×1 matrix of the integer-pel-unitpixel values, i.e., P_(−(M−1)), . . . P_(M) pixel values, describedabove in relation to Equation 1. The number of integer-pel-unit pixelvalues used to perform interpolation, i.e., 2M, refers to the number oftaps of a one-dimensional interpolation filter. D is a square matrix forperforming one-dimensional DCT and may be defined as represented inEquation 4.

$\begin{matrix}{{D_{kl} = {\frac{1}{M}{\cos\left( \frac{\left( {{2l} - 1 + {2\; M}} \right)k\;\pi}{4\; M} \right)}}},} & \left\lbrack {{Equation}\mspace{14mu} 4} \right\}\end{matrix}$0≦k≦2M−1,−(M−1)≦l≦M  [Equation 4]where k and l are integers that satisfy the above conditions, and D_(kl)refers to a row k and a column l of the square matrix D for performingDCT in Equation 3. M is the same as that of Equation 3.

IDCT using a plurality of phase-shifted basis functions according toEquation 2 is expressed by a matrix equation represented in Equation 5.P(α)=W(α)×C  [Equation 5]

Here, P(α) is the same as that of Equation 2, and W(α) is a 1×2M matrixfor performing one-dimensional IDCT by using a plurality ofphase-shifted basis functions and may be defined as represented inEquation 6.W ₀(α)=½,

${{W_{k}(\alpha)} = {\cos\left( \frac{\left( {{2\;\alpha} - 1 + {2\; M}} \right)k\;\pi}{4\; M} \right)}},$1≦k≦2M−1  [Equation 6]

where k is an integer that satisfies the above condition, and W_(k)(α)refers to a column k of the matrix W(α) described above in relation toEquation 5. A filter F(α) for performing one-dimensional DCT andone-dimensional IDCT using a plurality of phase-shifted basis functionsaccording to Equations 3 and 5 may be defined as represented in Equation7.

$\begin{matrix}{{{P(\alpha)} = {{F(\alpha)} \times {REF}}},{{F_{l}(\alpha)} = {\sum\limits_{k = 0}^{{2\; M} - 1}{{W_{k}(\alpha)}D_{k\; l}}}},{0 \leq k \leq {{2\; M} - 1}},{{- \left( {M - 1} \right)} \leq l \leq M}} & \left\lbrack {{Equation}\mspace{14mu} 7} \right\rbrack\end{matrix}$

where k and l are integers that satisfy the above conditions, F₁(α)refers to a column 1 of F(α), and W(α) and D are the same as those ofEquation 3.

In order to generate more strongly smoothed sub-pel-unit pixel values,the interpolator 14 may change an interpolation filter used to performtransformation and inverse transformation based on a basis function.

A case when a window function is used, a case when a plurality ofsmoothing parameters are used, a case when a spline function is used asa basis function, and a case when a polynomial function is used as abasis function to determine various smoothing interpolation filters willnow be sequentially described in detail.

<Smoothing Interpolation Filter Using Window Function>

A method of smoothing interpolation filter coefficients by using awindow function will now be described in detail.

A window function may include a hamming window function, a cosine windowfunction, an exponential window function, a hanning window function, aBlackman window function, and a triangle window function. Although caseswhen interpolation filters based on transformation and inversetransformation are smoothed by using certain window functions will bedescribed below for convenience of explanation, it will be easilyunderstood by one of ordinary skill in the art that, in addition to thedescribed window functions, other window functions having similarfrequency responses may also be used.

Window coefficients based on a hamming window function satisfy Equation24.

$\begin{matrix}{{{w(n)} = {0.54 - {0.46\;{\cos\left( \frac{2\;\pi\; n}{N} \right)}}}},{0 \leq n \leq N}} & \left\lbrack {{Equation}\mspace{14mu} 8} \right\rbrack\end{matrix}$

In various window functions including the hamming window function, aninput n is symmetric with reference to N/2 and a frequency response issimilar to that of a low pass filter. From among inputs of a windowfunction, only an input covered by a window formed by the windowfunction may be output. A window size N may be set as a positive integergreater than the length of an original interpolation filter. Forexample, in order to apply a window function to an interpolation filterfor generating a sub-pel-unit pixel such as a ½ or ¼ pixel, the centrallocation of the window function may be moved by a ½ or ¼ pixel. That is,since the central location of the window function is moved to aninterpolation location, the window function may be symmetric withrespect to the interpolation location.

For example, Equations 9 and 10 respectively show window coefficients ofhamming window functions for ½-pel-unit and ¼-pel-unit interpolationfilters, respectively.

$\begin{matrix}{{w_{1/2}(n)} = {0.54 - {0.46\;\cos\frac{2\;\pi}{N}\left( {\frac{N - 1}{2} + n} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 9} \right\rbrack\end{matrix}$

$\begin{matrix}{{w_{1/4}(n)} = {0.54 - {0.46\;\cos\frac{2\;\pi}{N}\left( {\frac{{2\; N} - 1}{4} + n} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 10} \right\rbrack\end{matrix}$

Equation 11 sequentially shows window coefficients of a hamming windowfunction, a cosine window function, and an exponential window functionas window functions for interpolation filters, which are generalizedbased on a sub-pel-unit interpolation location α.

$\begin{matrix}{{{w_{\alpha}(n)} = {0.54 - {0.46\;{\cos\left( {\frac{2\;\pi}{N}\left( {\frac{N}{2} - \alpha + n} \right)} \right)}}}},} & \left\lbrack {{Equation}\mspace{14mu} 11} \right\rbrack\end{matrix}$

${w_{\alpha{(n)}} = {\cos\;\left( {\pi\frac{n - \alpha}{N}} \right)}},$ω_(α)=exp−β(α−n)²  [Equation 11]

By combining the window coefficients according to Equation 11 with anoriginal interpolation filter f_(k)(α), smoothing interpolation filtercoefficients may be determined according to Equation 12.f _(k) =f _(k)(α)ω_(α)(k),k=−M+1, . . . ,M  [Equation 12]

Since a smoothing interpolation filter is determined by using a windowfunction, a weight of an interpolation filter coefficient may beadjusted based on the distance between an integer-pel-unit referencepixel and an interpolation location. For example, a smoothinginterpolation filter may be determined in such a way that, by a windowfunction, from among filter coefficients of an interpolation filter, afilter coefficient for an integer-pel-unit reference pixel located farfrom an interpolation location is greatly changed and a filtercoefficient for an integer-pel-unit reference pixel located close to theinterpolation location is not greatly changed.

Also, if a smoothing interpolation filter is determined by using awindow function, interpolation filtering may be performed afterinteger-pel-unit reference pixels are smoothed. Input integer-pel-unitreference pixels Ref={p_(−M+1), p_(−M+2), . . . , P₀, p₁ . . . , p_(M)}may include noise or may be damaged due to an error such as aquantization error. As such, if integer-pel-unit reference pixels aresmoothed before interpolation filtering is performed, the imageinterpolation apparatus 10 may improve an interpolation effect.

<Smoothing Interpolation Filter Using Two Parameters>

A smoothing interpolation filter may determine the smoothness of filtercoefficients based on two parameters. Sub-pel-unit smoothinginterpolation filter coefficients obtained by combining a smoothingmatrix S and interpolation filter coefficients based on transformationand inverse transformation satisfy Equation 13.{tilde over (f)}(α)=f(α)^(T) S  [Equation 13]

Equation 14 shows an example of the smoothing matrix S.s _(i,j)=0;{s _(i,i)=1−σ_(i) ;s _(i,i+1)=σ_(i) };i=−M+1{s _(i,i)=1−2σ_(i) ;s _(i,i±1)=σ_(i) };−M+1≦i≦M{s _(i,i)=1−σ_(i) ;s _(i,i−1)=σ_(i) };i=M  [Equation 14]

The smoothing matrix S according to Equation 14 is a 3-diagonal matrix.In other words, from among components of the smoothing matrix S,components other than components on one central diagonal line and twodiagonal lines corresponding to each other and adjacent to the centraldiagonal line are all 0.

In the smoothing matrix S, a smoothness σi may be determined regardlessof the distance (i−α) from integer-pel-unit pixels to be interpolated.In this case, smoothing based on the smoothing matrix S may be referredto as uniform smoothing.

Also, in the smoothing matrix S, the smoothness σ_(i) may vary based onan index I of an integer-pel-unit pixel location. In this case,smoothing based on the smoothing matrix S may be referred to asnon-uniform smoothing. For example, the smoothness a, may satisfyEquation 15.σ_(i)=β(i−α)^(l)  [Equation 15]

A positive index l may increase a smoothing effect if the distancebetween an interpolation location and an integer-pel-unit referencepixel is large. Accordingly, the positive index l may control the speedof smoothing based on the distance between an interpolation location andan integer-pel-unit reference pixel. A smoothing parameter β may controlthe range of smoothing around an interpolation location.

If the smoothing parameter β is less than 0, the smoothing matrix Saccording to Equation 13 may be changed to a sharpening filter.Accordingly, if the smoothing matrix S that is less than 0 is combinedwith an interpolation filter using transformation and inversetransformation, a filter for amplifying high-frequency components may begenerated.

In order to perform sub-pel-unit prediction, the image interpolationapparatus 10 may use smoothing interpolation filter coefficient datapreviously stored in memory.

FIG. 5 is a graph 50 of a smoothing factor based on a smoothingparameter β of a smoothing interpolation filter, according to anexemplary embodiment.

First and second curves 52 and 54 show a smoothing factor for smoothingan interpolation filter based on discrete transformation. If m is large,that is, if the distance from integer-pel-unit pixels to be interpolatedis increased, the smoothing factor is close to 0.

Here, in comparison to the second curve 54 in a case when the smoothingparameter β is large, the first curve 52 in a case when the smoothingparameter β is small has a relatively large width of the smoothingfactor. In other words, if the smoothing parameter β of the smoothinginterpolation filter is large, low-frequency components may be mainlyfiltered and thus relatively strongly smoothed sub-pel-unit pixel valuesmay be generated. If the smoothing parameter β of the smoothinginterpolation filter is relatively small, relatively high-frequencycomponents may remain and be interpolated and thus sub-pel-unit pixelvalues may be generated.

In order to determine filter coefficients of a smoothing interpolationfilter, the image interpolation apparatus 10 may use a spline functionor a polynomial function as a basis function as well as an orthogonalbasis function.

<Smoothing Interpolation Filter Based on Spline Function>

The image interpolation apparatus 10 may determine filter coefficientsof a smoothing interpolation filter based on a spline function.

Also, in order to smooth an interpolation result, the imageinterpolation apparatus 10 may use a spline function having a boundarycondition. In more detail, for example, if polynomial splineinterpolation having a variable ρ is used to form an interpolationfilter using M integer-pel-unit pixels p_(m) (M is an integer equal toor greater than 2), in order to allow the variable ρ has a maximumsmoothness in a range of 3≦ρ≦M+1 and to allow a spline value, i.e., aninterpolation result value to be infinitely smooth at an (−M+2)th pixeland an (M−1)th pixel, (ρ−1) additional conditions may be set. Theseadditional conditions are referred to as not-a-knot boundary conditionsor de Boor boundary conditions.

An interpolation result using interpolation filter coefficients based ona spline function may be represented as a weighted sum calculated byusing Equation 16.

$\begin{matrix}{{S(x)} = {\sum\limits_{{- M} + 1}^{M}{p_{m}{f_{m}(x)}}}} & \left\lbrack {{Equation}\mspace{14mu} 16} \right\rbrack\end{matrix}$

Input pixels p_(m) are integer-pel-unit reference pixels, and a set{p_(m)} of input pixels in which the range of m is [−M+1, M] (i.e.,−M+1≦m≦M) are input. A spline function S(x) corresponds to pixel valuesgenerated as an interpolation result. f_(m)(x) is a cardinal splineinterpolant and corresponds to filter coefficients based on a cardinalspline function. f_(m)(x) may be cardinal spline function values havingthe same boundary condition and having values only at integer-pel-unitreference pixel locations (i.e., −M+1≦m≦M, m is an integer).

The filter coefficient f_(m)(x) may be determined by using Equation 17.f _(m)(x)=δ_(m) ^(−M+1+k)(1−z)+δ_(m) ^(−M+1+k+1) z+σm ^(k)((1−z)³+z−1)/6+σm ^(k+1)(z ³ −z)/6,z=x+M−1−k  [Equation 17]

When k is an integer in a range of 0≦k≦2M−2, the spline filtercoefficient f_(m)(x) may be determined at every integer m in a range of[−M+1+k, −M+k+2], i.e., from (−M+1+k) to (−M+k+2). In Equation 17, acoefficient σ_(m) ^(k) may be determined based on Equation 18.−σ_(m) ⁰+2σ_(m) ¹−σ_(m) ²=0,σ_(m) ^(k−1)+4σ_(m) ^(k)+σ_(m) ^(k+1)=6(δ_(m) ^(k−1)−2δ_(m) ^(k)+δ_(m)^(k+1)),1≦k≦2M−3,−σ_(m) ^(2M−3)+2σ_(m) ^(2M−2) −σm ^(2M−1)=0  [Equation 18]

For sub-pel-unit interpolation, a finite impulse response (FIR) filterincluding spline filter coefficients f_(m)(α) according to aninterpolation location α may be previously calculated and stored, and asub-pel-unit pixel value at an interpolation location α between a 0thpixel and a first pixel may be generated by performing interpolationfiltering using the FIR filter including the spline filter coefficientsf_(m)(α) on the integer-pel-unit reference pixel p_(m).

FIG. 6 is a graph of a spline function 60 usable by a smoothinginterpolation filter, according to an exemplary embodiment.

Referring to FIG. 6, based on a spline function having a variable ρ of3, three spline interpolant curves f⁻²(x) 61, f⁻¹(x) 62, and f₀(x) 63for 2M=6, i.e., a 6-tap interpolation filter are illustrated. Forexample, interpolation filter coefficients for generating sub-pel-unitpixel values that satisfy α=¼ may be determined as f⁻²(¼) 64, f⁻¹(¼) 65,and f₀(¼) 66 on the spline interpolant curves f⁻²(x) 61, f⁻¹(x) 62, andf₀(x) 63.

<Smoothing Interpolation Filter Based on Polynomial Function>

The image interpolation apparatus 10 may determine filter coefficientsof a smoothing interpolation filter based on a polynomial function.

A polynomial interpolation function including interpolation filtercoefficients {f_(k)} based on a polynomial function may be representedbased on a polynomial function as a basis function by using Equation 19.The integer k is defined within a range of −M+1≦k≦M.

$\begin{matrix}{{\sum\limits_{{- M} + 1}^{M}{{f_{k}(\alpha)}{\mathbb{e}}^{{\mathbb{i}}\;{wk}}}},{\mathbb{e}}^{{\mathbb{i}}\; w\;\alpha}} & \left\lbrack {{Equation}\mspace{14mu} 19} \right\rbrack\end{matrix}$

Also, in order to smooth an interpolation result, the imageinterpolation apparatus 10 may determine filter coefficients optimizedto a low-frequency band from among interpolation filter coefficients{f_(k)} based on a polynomial function. For example, if a frequency ω is0, filter coefficients {f_(k)} determined when a function value of apolynomial interpolation function and function values of derivatives ofthe polynomial interpolation function are the same, may be determined asinterpolation filter coefficients optimized to a low-frequency band. Assuch, as represented in Equation 20, as a function for the integer k, 2Mlinear functions for 2M filter coefficients {f_(k)} (2M is an unknown)may be obtained.

$\begin{matrix}{{\sum\limits_{{- M} + 1}^{M}{{f_{k}(\alpha)}k^{m}}} = \alpha^{m}} & \left\lbrack {{Equation}\mspace{14mu} 20} \right\rbrack\end{matrix}$

Solutions of the linear functions of Equation 20 may be calculated byusing a Newton polynomial function. Equation 21 represents 2M filtercoefficients {f_(k)} calculated as solutions of the linear functions ofEquation 20.

${f_{k}(\alpha)} = \frac{\prod\limits_{{m = {{- M} + 1}},{m \neq k}}^{M}\;\left( {m - \alpha} \right)}{\prod\limits_{{m = {{- M} + 1}},\;{m \neq k}}^{M}\;\left( {m - k} \right)}$

An interpolation filter including the filter coefficients {f_(k)}determined based on the Newton polynomial function of Equations 20 and21 has a maximum response at a low-frequency band, a more stronglysmoothed interpolation result may be obtained by using pixel valuesusing this interpolation filter. Accordingly, an interpolation filterincluding filter coefficients determined based on a polynomial functionas a basis function may be selected as a smoothing interpolation filter.

As such, the image interpolation apparatus 10 may generate more stronglysmoothed interpolation pixels by selecting a smoothing interpolationfilter including interpolation filter coefficients based on a polynomialfunction. In particular, since chroma pixels have strong high-frequencycomponents, in order to generate sub-pel-unit pixel values of chromainteger-pel-unit pixels, a smoothing interpolation filter includinginterpolation filter coefficients based on a polynomial function may beused.

<Interpolation Filter Coefficients for Scaled Interpolation>

Various smoothing interpolation filter generation methods according toexemplary embodiments are based on an arithmetic expression forgenerating a floating point number instead of an integer, and absolutevalues of filter coefficients are usually not greater than 1.Specifically, a calculation result of a real number instead of aninteger may be generated by a sub-pel-unit interpolation location α.

The efficiency of integer-based calculation is greater than that offloating-point-based calculation. As such, the image interpolationapparatus 10 may improve the calculation efficiency of interpolationfiltering by scaling filter coefficients into integers by using ascaling factor. Also, since a bit depth of pixel values is increased,the accuracy of interpolation filtering may also be improved.

The image interpolation apparatus 10 may multiply filter coefficientsf_(m)(α) by a predetermined value, and may perform image interpolationby using large filter coefficients F_(m)(α). For example, the filtercoefficients F_(m)(α) may be scaled from the filter coefficientsf_(m)(α) as represented in Equation 22.F _(m)(α)=int(f _(m)(α)·2^(n))  [Equation 22]

For efficiency of calculation, the scaling factor may be in the form of2^(n). n may be 0 or a positive integer. An interpolation filteringresult using filter coefficients scaled by 2^(n) may have a bit depthscaled by n bits in comparison to a result obtained by using originalfilter coefficients.

Integer calculation interpolation filtering using the scaled filtercoefficients F_(m)(α) may satisfy Equation 23. In other words, afterinterpolation filtering is performed by using the scaled filtercoefficients F_(m)(α), the scaled bit depth has to be reconstructed toan original bit depth.

$\begin{matrix}{{p(\alpha)} = {\left( {{\sum\limits_{{- M} + 1}^{M}{{F_{m}(\alpha)} \cdot p_{m}}} + {offset}} \right) ⪢ n}} & \left\lbrack {{Equation}\mspace{14mu} 23} \right\rbrack\end{matrix}$

In this case, an offset may be 2^(n−1).

In other words, since an scaled filtering result using a scaledsmoothing interpolation filter has to be reduced by a scaling factor,i.e., 2^(n), so as to be reconstructed to original bits, a bit depth ofthe scaled filtering result may be reduced by n bits.

If two-step interpolation filtering is performed by performingone-dimensional interpolation filtering in a horizontal direction andperforming one-dimensional interpolation filtering in a verticaldirection, a reduction may be made by a total of 2n bits. Accordingly,if a first one-dimensional interpolation filter is scaled by n1 bits anda second one-dimensional interpolation filter is scaled by n2 bits,after two-step interpolation filtering is performed by using the firstand second one-dimensional interpolation filters, a reduction may bemade by a sum of n1 and n2, i.e., 2n bits. The first one-dimensionalinterpolation filter may be an interpolation filter that is not scaled.

Since a sum of the smoothing filter coefficients f_(m)(α) is 1,Σ_(−M+1) ^(M) f _(m)(α)=1  [Equation 10]

where a condition for normalizing the scaled smoothing filtercoefficients F_(m)(α) of the scaled interpolation filter satisfiesEquation 25.Σ−M+1^(M) F _(m)(α)=2^(n)  [Equation 25]

However, the normalization condition according to Equation 25 may causea rounding error. The image interpolation apparatus 10 may round off thescaled filter coefficients F_(m)(α) based on the normalization conditionaccording to Equation 19. For normalization, some of the scaled filtercoefficients F_(m)(α) may be adjusted within a predetermined range oforiginal values. For example, some of the scaled filter coefficientsF_(m)(α) may be adjusted within a range of ±1 in order to correct arounding error.

Various smoothing interpolation filters and filter coefficients aredescribed above. Specifically, as a function for determining filtercoefficients of a smoothing interpolation filter, a window function, aspline function, a polynomial function, etc. may be used. For asmoothing interpolation filter, a frequency response of a function mayvary based on a frequency but a filter gain of the frequency response ofthe function may be close to 1. Accordingly, the image interpolationapparatus 10 may determine filter coefficients by using a functionhaving a filter gain of which a frequency response is closest to 1 evenwhen a frequency varies, and may select a smoothing interpolation filterincluding the filter coefficients.

FIG. 7 is a flowchart of an image interpolation method according to anexemplary embodiment.

In operation 71, an interpolation filter is differently selected basedon a sub-pel-unit interpolation location and a smoothness from amonginterpolation filters for generating at least one sub-pel-unit pixelvalue located between integer-pel-unit pixels of a picture. A smoothnessof the interpolation filter may be determined based on a distancebetween an interpolation location and integer-pel-units.

An interpolation filter according to an exemplary embodiment may be afilter including filter coefficients for performing transformation andinverse transformation based on a plurality of basis functions. Asmoothing interpolation filter according to an embodiment may include atleast one of an interpolation filter combined with a window function, aninterpolation filter based on a plurality of smoothing parameters, aninterpolation filter based on a smoothing parameter, a splineinterpolation filter, and a polynomial function interpolation filter.

In order to perform filtering by using a smoothing interpolation filter,filter coefficients may be determined to more strongly smoothinteger-pel-unit reference pixels away from an interpolation location.

In operation 73, at least one sub-pel-unit pixel value is generated byinterpolating pixel values of the integer-pel-unit pixels by using theinterpolation filter selected in operation 71.

From among interpolation filters, if an interpolation filter includingfilter coefficients scaled to integers is selected, pixel valuesgenerated by using the interpolation filter may be normalized based on ascaling factor.

According to an exemplary embodiment, an interpolation filter may bedifferently selected based on characteristics of pixels to beinterpolated, and sub-pel-unit pixel values may be generated by usingthe selected interpolation filter.

Various examples of filter coefficients of an interpolation filterdetermined in consideration of a sub-pel-unit interpolation location anda smoothness will now be described with reference to FIGS. 8A through8C, 9A through 9C, 10, 11, and 12A through 12C.

FIGS. 8A through 8C are tables showing filter coefficients of 12-tapinterpolation filters determined based on a smoothing parameter and aninterpolation location, according to exemplary embodiments.

Referring to FIGS. 8A through 8C, from among the above-describedinterpolation filters based orthogonal transformation, in order toperform orthogonal transformation and inverse transformation aftersmoothing the integer-pel-unit reference pixels as described above inrelation to FIG. 5, filter coefficients of a smoothing interpolationfilter obtained by combining a smoothing matrix and an interpolationfilter based on an orthogonal transformation are shown.

FIGS. 8A through 8C show various interpolation filters includingdifferent filter coefficients as a smoothing parameter β varies as 0,0.002, 0.004, 0.006, 0.008, 0.010, 0.012, 0.014, 0.016, 0.018, and0.020, and an interpolation location α varies as ⅛, ¼, ⅜, ½, ⅝, ¾, and⅞.

For example, in the table of FIG. 8A, if the smoothing parameter β is0.002 and the interpolation location α is ⅛, a filter including filtercoefficients {f_(m)}, e.g., {f⁻¹¹, f⁻¹⁰, f⁻⁹, f⁻⁸, f⁻⁷, f⁻⁶, f⁻⁵, f⁻⁴,f₃, f⁻², f⁻¹, f₀, f₁, f₂, f₃, f₄, f₅, f₆, f₇, f₈, f₉, f₁₀, f₁₁, f₁₂},determined as {−1, 4, −7, 12, −24, 246, 37, −16, 9, −5, 3, −1} may beselected as an interpolation filter.

FIGS. 9A through 9C are tables showing filter coefficients of 6-tapinterpolation filters determined based on a smoothing parameter and aninterpolation location, according to exemplary embodiments.

Although the filter coefficients of FIGS. 8A through 8C are 12 filtercoefficients of a 12-tap interpolation filter from among smoothinginterpolation filters obtained by combining a smoothing matrix and anorthogonal transformation interpolation filter, FIGS. 9A through 9C show6 filter coefficients of a 6-tap interpolation filter. In FIGS. 8Athrough 8C, and 9A through 9C, various smoothing interpolation filtersincluding different filter coefficients based on the smoothing parameterβ and the interpolation location α may be shown.

The filter coefficients shown in FIGS. 8A through 8C, and 9A through 9Care coefficients scaled at a scaling factor of 256 (=2⁸) based on scaledinterpolation filtering and then rounded off.

In FIGS. 8A through 8C and 9A through 9C, when the interpolationlocation α is constant and the smoothing parameter β is increased, afilter coefficient f_(m) may be relatively small.

Also, when the smoothing parameter β is constant and the interpolationlocation α is away from ½, if m of the filter coefficient f_(m) is awayfrom m=0 toward m=−M+1 or m=M, the filter coefficient f_(m) may berelatively small in comparison to f0. The filter coefficient f_(m) nearm=0 may be relatively large.

Accordingly, when the smoothing parameter β is increased, if theinterpolation location α is away from ½, that is, close to aninteger-pel-unit pixel, a sharper interpolation filter, i.e., a lesssmoothing interpolation filter, may be selected.

Since an interpolation filter according to an exemplary embodiment is amirror-reflective symmetric filter, a filter coefficient f_(m)(α) of aninterpolation location (1−α) may be determined by using the filtercoefficient f_(m)(α) of the interpolation location α. For example, inFIG. 9A, from among the filter coefficients {f_(m)} having the smoothingparameter β=0.002, filter coefficients {f_(m)(⅜)} of the interpolationlocation α=⅜ and filter coefficients {f_(m)(⅝)} of the interpolationlocation α=1−⅜=⅝ are compared as shown below.{f _(m)(⅜)}={11,−42,196,117,−35,10},{f _(m)(⅝)}={10,−35,117,196,−42,11}

That is, it is shown that the filter coefficients {f_(m)(⅜)} when m=−2,−1, 0 are the same as filter coefficients {f_(m)(⅝)} when m=3, 2, 1, andthe filter coefficients {f_(m)(⅜)} when m=3, 2, 1 are the same as filtercoefficients {f_(m)(⅝)} when m=−2, −1, 0. Accordingly, in tables ofFIGS. 10 through 12C, although only interpolation filter coefficientsf_(m)(α) in a case when the interpolation location is less than or equalto ½ are shown, it will be easily understood by one of ordinary skill inthe art that the interpolation filter coefficients f_(m)(α) in a casewhen the interpolation location is greater than ½ may also bedetermined.

FIG. 10 is a table showing filter coefficients of 6-tap interpolationfilters determined for chroma pixels based on a smoothing parameter andan interpolation location, according to an exemplary embodiment.

The image interpolation apparatus 10 may differently select aninterpolation filter based on image characteristics. For example, if asmoothing interpolation filter obtained by combining a smoothing matrixand an orthogonal transformation interpolation filter is determined, asmoothing parameter may vary based on image characteristics.

For example, since chroma pixels are down-sampled based on a colorformat of 4:2:0, the chroma pixels have less low-frequency components incomparison to luma pixels. In this case, referring to FIG. 10,regardless of an interpolation filter for luma pixels, only aninterpolation filter for chroma pixels may be additionally selected.Various filter coefficients of interpolation filters differentlyselected based on a color component will now be described with referenceto FIG. 11.

FIG. 11 is a table showing filter coefficients of smoothinginterpolation filters differently determined based on a color componentand an image interpolation location, according to an exemplaryembodiment.

Referring to FIG. 11, various smoothing interpolation filters includingdifferent filter coefficients as a number of filter taps 2M, aninterpolation location α, and a color component L(luma)/C(chroma) vary.The filter coefficients of FIG. 11 are coefficients scaled at a scalingfactor of 256 (=2⁸) and rounded off. As described above, based onmirror-reflective characteristics of interpolation filter coefficients,only a case when the interpolation location α is less than or equal to ½is shown.

Similarly to FIGS. 8A through 8C, 9A through 9C, and 10, a result ofcomparing filter coefficients for a chroma component and filtercoefficients for a luma component is similar to a result of comparingfilter coefficients in a case when a smoothing parameter β is large andfilter coefficients in a case when the smoothing parameter β is small.

FIGS. 12A through 12C are tables showing filter coefficients ofsmoothing interpolation filters based on an image interpolation locationand a scaling factor, according to exemplary embodiments.

FIGS. 12A through 12C show various modified examples of filtercoefficients of smoothing interpolation filters, which are scaled,rounded off, and normalized as a scaling factor of 2^(n) varies as 512,256, 128, and 64, and the number of filter taps of an interpolationfilter and an interpolation location α vary.

Specifically, in FIG. 12C, interpolation filter coefficients forinterpolating ⅛ pixel units may be useful to perform motion compensationon chroma pixels. However, since image quality of chroma pixels, whichis visually recognized by people, is less critical in comparison to lumapixels, due to a relatively short filter tap, e.g., 4-tap, and a low bitdepth, a smoothing interpolation filter having a scaling factor of 2⁵may also be used.

The filter coefficients shown in FIGS. 8A through 8C, 9A through 9C, 10,11, and 12A through 12C merely are parts of various examples, and itwill be easily understood by one of ordinary skill in the art thatfilter coefficients of interpolation filters considering smoothing,according to exemplary embodiments, may be modified based on variousfactors including an interpolation location, a smoothing parameter, awindow function, a spline function, a polynomial function, a scalingfactor, and rounding off.

Video encoding and decoding using a smoothing interpolation filter,according to exemplary embodiments, are described below with referenceto FIGS. 13A, 13B, 14A, 14B, and 15 through 27. Video encoding anddecoding based on coding units having a tree structure, according toexemplary embodiments, are described below with reference to FIGS. 15through 25. Video encoding and decoding methods using a smoothinginterpolation filter, according to exemplary embodiments, are describedbelow with reference to FIGS. 26 and 27.

When various operations are performed on image data, the image data maybe split into data groups and the same operation may be performed ondata of the same data group. In the following description, a data groupformed according to a predetermined standard is referred to as a ‘dataunit’, and an operation is performed on each ‘data unit’ by using dataincluded in the data unit.

<Video Encoding and Decoding Using Smoothing Interpolation Filter>

FIG. 13A is a block diagram of a video encoding apparatus 100 using asmoothing interpolation filter, according to an exemplary embodiment.

Operations of an encoder 120 and an output unit 130 of the videoencoding apparatus 100 may be cooperatively controlled by a videoencoding processor, a CPU, and a graphic processor.

In order to encode a current picture of an input video, the videoencoding apparatus 100 splits the current picture into data units havinga predetermined size and encodes each data unit.

For example, the current picture includes pixels in a spatial domain. Inorder to encode spatially adjacent pixels of the current picture at thesame time, the current picture may be split into pixel groups having apredetermined size in such a way that adjacent pixels within apredetermined range form one group. By performing a series of encodingoperations on pixels of the split pixel groups, the current picture maybe encoded.

Since initial data of a picture to be encoded are pixel values in thespatial domain, each pixel group may be used as a data unit to beencoded. Also, when transformation coefficients in a transformationdomain are generated by performing transformation for video encoding onpixel values of the pixel group in the spatial domain, thetransformation coefficients are included in coefficient groups havingthe same size as the pixel groups in the spatial domain. Accordingly, acoefficient group of the transformation coefficients in thetransformation domain may also be used as a data unit for encoding apicture.

Accordingly, in the spatial domain and the transformation domain, a datagroup having a predetermined size may be used as a data unit to beencoded. In this case, the size of a data unit may be defined as thenumber of pieces of data included in the data unit. For example, thenumber of pixels in the spatial domain or the number of transformationcoefficients in the transformation domain may represent the size of adata unit.

An encoding method or encoding characteristics of a current data unitmay be determined with respect to each data group of any data level fromamong a data unit, a slice, a picture, and a picture sequence of a videoto be currently encoded.

The video encoding apparatus 100 may encode the current picture byperforming prediction encoding including inter prediction and intraprediction, transformation, quantization, and entropy encoding on eachdata unit.

Based on inter prediction, in order to estimate a current pixel valuewith reference to a pixel value of a temporally previous or subsequentpicture, residual data between a pixel value of a reference region of areference picture and a pixel value of a current picture, and referencedata indicating the referred to pixel value may be determined.

In order to more accurately perform inter prediction, the video encodingapparatus 100 may determine the residual data and the reference data byusing a sub-pel-unit pixel value. In order to perform sub-pel-unit interprediction, the video encoding apparatus 100 may determine asub-pel-unit pixel value located between adjacent integer-pel-unitpixels by interpolating the adjacent integer-pel-unit pixels.

Also, the sub-pel-unit pixel value may be generated by performinginterpolation filtering on two or more integer-pel-unit reference pixelsincluding the adjacent integer-pel-unit pixels. The reference pixels forperforming interpolation filtering may be pixels of a reference picture.

In order to efficiently perform image interpolation, the video encodingapparatus 100 may selectively determine interpolation filtercoefficients. The encoder 120 may include the image interpolationapparatus 10 illustrated in FIG. 1. In other words, in order to performsub-pel-unit inter prediction, the encoder 120 may generate asub-pel-unit pixel value by using an interpolation filter includingfilter coefficients determined by the image interpolation apparatus 10based on transformation and inverse transformation.

In order to efficiently perform interpolation filtering, the videoencoding apparatus 100 may previously store interpolation filtercoefficients in memory. According to an interpolation location, asmoothness, the number of filter taps, a bit depth, a scaling factor,and a basis function of interpolation filtering based on transformationmay be stored in memory of the video encoding apparatus 100.

For example, at least one of (i) 8-tap ¼-pel-unit filter coefficients{−1, 4, −10, 57, 19, −7, 3, −1} having a scaling factor of 2⁶, (ii)8-tap ½-pel-unit filter coefficients {−1, 4, −11, 40, 40, −11, 4, −1}having a scaling factor of 2⁶, (iii) 4-tap ⅛-pel-unit filtercoefficients {−3, 60, 8, −1} having a scaling factor of 2⁶, (iv) 4-tap¼-pel-unit filter coefficients {−4, 54, 16, −2} having a scaling factorof 2⁶, (v) 4-tap ⅜-pel-unit filter coefficients {−5, 46, 27, −4} havinga scaling factor of 2⁶, and (vi) 4-tap ½-pel-unit filter coefficients{−4, 36, 36, −4} having a scaling factor of 2⁶ may be stored in memoryand may be used to perform smoothing interpolation filtering.

In addition to the above-mentioned filter coefficients, smoothinginterpolation filter coefficients modifiable based on various basisfunctions and window functions as shown in FIGS. 8A through 8C, 9Athrough 9C, 10, 11, and 12A through 12C may be used to performinterpolation filtering.

If interpolation filtering is performed by using the filter coefficientsstored in memory, a calculation speed of inter prediction may beimproved.

From among a plurality of interpolation filters, the encoder 120 mayselect and use a desired smoothing interpolation filter to perform interprediction based on a sub-pel-unit interpolation location α and asmoothness. Besides, a smoothing interpolation filter appropriate for acurrent pixel may be determined based on the number of filter taps, abit depth, a scaling factor, etc.

The encoder 120 may determine an interpolation filter based on imagecharacteristics. For example, the encoder 120 may determine differentinterpolation filters based on color components of pixels. For example,an interpolation filter for luma pixels and an interpolation filter forchroma pixels may be separately selected and thus sub-pel-unit pixelvalues may be individually generated by performing interpolationfiltering.

A video may be encoded by performing inter prediction based onsub-pel-unit interpolation, intra prediction, transformation, andquantization.

The output unit 130 may encode and output encoding information and mayoutput encoded picture data. As the encoding information, informationabout the selected interpolation filter may be additionally encoded. Inother words, information about an interpolation filter used to performsub-pel-unit prediction encoding may be encoded. For example, a decoderhas to know about an interpolation filter used to encode an image inorder to decode the image by using the same interpolation filter used inthe encoding process. For this, information indicating the usedinterpolation filter may be encoded together with the image. However, ifa filter is selected based on a previous encoding result, i.e., context,information about the selected filter may not be additionally encoded.

The output unit 130 may perform entropy encoding on encoding informationand encoded picture data and may output a bitstream.

FIG. 13B is a block diagram of a video decoding apparatus 200 using asmoothing interpolation filter, according to an exemplary embodiment.

The video decoding apparatus 200 includes a receiver and extractor 220and a decoder 230. Operations of the receiver and extractor 220 and thedecoder 230 of the video decoding apparatus 200 may be cooperativelycontrolled by a video decoding processor, a graphic processor, and aCPU.

In order to reconstruct an image from a bitstream, the video decodingapparatus 200 may decode encoded picture data of the bitstream byperforming operations including entropy decoding, inverse quantization,inverse transformation, inter prediction/compensation, and intraprediction/compensation.

The receiver and extractor 220 receives and parses a bitstream of anencoded video. The receiver and extractor 220 may extract encoded dataof each data unit of a current picture, and encoding informationincluding information about an encoding method to be used to decode theencoded data, from the parsed bitstream.

If the encoding information includes interpolation filter information,the decoder 230 may read information about an interpolation filter usedto perform sub-pel-unit intra prediction from the interpolation filterinformation, and may perform motion compensation by using theinterpolation filter used in an encoding process.

The decoder 230 may decode encoded picture data by performing variousdecoding operations such as entropy decoding, inverse quantization,inverse transformation, inter prediction/compensation, and intraprediction/compensation on an encoded picture according to variousdecoding methods determined based on information about a coding mode.

In order to perform motion compensation, a reference region of areference picture that is temporally previous or subsequent to a currentpicture may be determined by using reference data, and a pixel value ofthe reference region and residual data may be combined to reconstruct acurrent pixel value.

If the residual data and the reference data are determined based onpixels interpolated in a sub-pel unit in an encoding process, thedecoder 230 may also perform motion compensation based on pixelsinterpolated in a sub-pel unit. In order to perform sub-pel-unit motioncompensation, the decoder 230 may generate a sub-pel-unit pixel value byinterpolating adjacent integer-pel-unit pixels of the reference picture.The sub-pel-unit pixel value may be generated by performinginterpolation filtering on two or more integer-pel-unit reference pixelsincluding the adjacent integer-pel-unit pixels.

In order to efficiently perform image interpolation, the video decodingapparatus 200 may selectively determine interpolation filtercoefficients. The decoder 230 may include the image interpolationapparatus 10 illustrated in FIG. 1. In other words, in order to performsub-pel-unit motion compensation, the decoder 230 may generate asub-pel-unit pixel value by using an interpolation filter based ontransformation.

In order to efficiently perform interpolation filtering, the videodecoding apparatus 200 may previously store variously selectableinterpolation filter coefficients in memory according to aninterpolation location, a smoothness, the number of filter taps, a bitdepth, a scaling factor, and a basis function of interpolation filteringbased on transformation.

As described above, for example, at least one of (i) 8-tap ¼-pel-unitfilter coefficients {−1, 4, −10, 57, 19, −7, 3, −1} having a scalingfactor of 2⁶, (ii) 8-tap ½-pel-unit filter coefficients {−1, 4, −11, 40,40, −11, 4, −1} having a scaling factor of 2⁶, (iii) 4-tap ⅛-pel-unitfilter coefficients {−3, 60, 8, −1} having a scaling factor of 2⁶, (iv)4-tap ¼-pel-unit filter coefficients {−4, 54, 16, −2} having a scalingfactor of 2⁶, (v) 4-tap ⅜-pel-unit filter coefficients {−5, 46, 27, −4}having a scaling factor of 2⁶, and (vi) 4-tap ½-pel-unit filtercoefficients {−4, 36, 36, −4} having a scaling factor of 2⁶ may bestored in memory and may be used to perform smoothing interpolationfiltering. In addition to the above-mentioned filter coefficients,smoothing interpolation filter coefficients modifiable according tovarious basis functions and window functions as shown in FIGS. 8Athrough 12C may be used to perform smoothing interpolation filtering.

From among a plurality of interpolation filters, the decoder 230 mayselect and use an interpolation filter appropriate for a current pixelto perform sub-pel-unit motion compensation according to a sub-pel-unitinterpolation location α, the number of filter taps, a bit depth, ascaling factor, etc.

Also, the decoder 230 may determine a smoothing interpolation filterbased on image characteristics. For example, different interpolationfilters may be determined according to color components of pixels,interpolation filtering for luma pixels and interpolation filtering forchroma pixels may be separately performed, and thus interpolatedsub-pel-unit pixel values may be individually generated.

Accordingly, the decoder 230 may reconstruct data in a spatial domain byperforming inverse quantization/inverse transformation, and mayreconstruct pixel values and a current picture by performing intraprediction and motion compensation based on sub-pel-unit interpolationas well as integer-pel-unit interpolation. If pictures arereconstructed, a video may be decoded.

FIG. 14A is a flowchart of an image encoding method using a smoothinginterpolation filter, according to an exemplary embodiment.

In operation 1410, in order to encode a current picture of an inputvideo, prediction encoding using sub-pel-unit interpolation isperformed. An interpolation filter is differently selected based on asub-pel-unit interpolation location and a smoothness from amonginterpolation filters for generating a sub-pel-unit pixel value. Thesmoothness of the interpolation filter may be determined based on thedistance between an interpolation location and integer-pel units.

The sub-pel-unit pixel value may be generated by performinginterpolation filtering on two or more integer-pel-unit reference pixelsof a reference picture. Residual data and reference data are determinedby using the generated sub-pel-unit pixel value, thereby performingprediction encoding.

In order to efficiently perform image interpolation, interpolationfilter coefficients may be selectively determined. From among theinterpolation filter coefficients previously stored in memory, a desiredinterpolation filter may be selected based on a sub-pel-unitinterpolation location, a smoothness, the number of filter taps, a bitdepth, a scaling factor, a basis function of interpolation filteringbased on transformation, and a color component, and interpolation may beperformed to generate the sub-pel-unit pixel value.

In operation 1420, transformation and quantization are performed on aninter prediction result based on sub-pel-unit interpolation, and intraprediction.

In operation 1430, a bitstream may be output by performing entropyencoding on encoding information and encoded picture data in the form ofquantized transformation coefficients. The encoding information mayinclude information about an interpolation filter used to performsub-pel-unit prediction encoding.

FIG. 14B is a flowchart of an image decoding method using a smoothinginterpolation filter, according to an exemplary embodiment.

In operation 1450, a bitstream of an encoded video is received,entropy-decoded, and parsed to extract quantized transformationcoefficients and encoding information of a current picture from thebitstream.

If the encoding information includes information about an interpolationfilter, the type of a required interpolation filter may be read from theinformation.

In operation 1460, according to various decoding methods determinedbased on a coding mode read from the encoding information, inversequantization and inverse transformation are performed on the quantizedtransformation coefficients, and residual data is added, therebyreconstructing data in a spatial domain.

In operation 1470, encoded picture data may be decoded by performingvarious decoding operations such as motion compensation and intraprediction based on the coding mode.

Specifically, if encoded residual data and reference data are extractedbased on pixels interpolated in a sub-pel unit, motion compensation maybe performed based on the pixels interpolated in a sub-pel unit. Fromamong interpolation filters for generating a sub-pel-unit pixel value,an interpolation filter is differently selected based on a sub-pel-unitinterpolation location and a smoothness.

In order to efficiently perform image interpolation, interpolationfilter coefficients may be selectively determined. From among theinterpolation filter coefficients previously stored in memory, a desiredinterpolation filter may be selected according to a sub-pel-unitinterpolation location, a smoothness, the number of filter taps, a bitdepth, a scaling factor, a basis function of interpolation filteringbased on transformation, and a color component, and interpolation may beperformed to generate the sub-pel-unit pixel value. Since motioncompensation is performed on pixels interpolated by using theinterpolation filter coefficients previously stored in memory, acalculation speed may be increased.

A reference picture and a reference region are determined by using thereference data, and the sub-pel-unit pixel value may be generated byperforming interpolation filtering on two or more integer-pel-unitreference pixels of the reference picture. Motion compensation may beperformed by combining the generated sub-pel-unit pixel value and theresidual data, and thus prediction decoding may be performed.

In operation 1480, a current picture is reconstructed by using pixelvalues obtained by performing prediction decoding, and thus a video isdecoded.

<Video Encoding and Decoding Using Smoothing Interpolation Based onCoding Units Having Tree Structure>

Video encoding and decoding apparatuses using a smoothing interpolationfilter based on coding units having a tree structure, and video encodingand decoding methods corresponding to the video encoding and decodingapparatuses, according to exemplary embodiments, will now be describedin detail with reference to FIGS. 13A, 13B, 14A, 14B, and 15 through 27.

The video encoding apparatus 100 may encode a video based on codingunits and transformation units having a tree structure.

A current picture of a video may be split based on a maximum coding unitfor the current picture. If the current picture is larger than themaximum coding unit, image data of the current picture may be split intoat least one maximum coding unit. The maximum coding unit may be a dataunit having a size of 32×32, 64×64, 128×128, 256×256, etc., wherein ashape of the data unit is a square having a width and length in squaresof 2. The encoder 120 may encode picture data of each of at least onemaximum coding unit.

A coding unit according to an exemplary embodiment may be characterizedby a maximum size and a depth. The depth denotes a number of times thecoding unit is spatially split from the maximum coding unit, and as thedepth deepens, deeper coding units according to depths may be split fromthe maximum coding unit to a minimum coding unit. A depth of the maximumcoding unit is an uppermost depth and a depth of the minimum coding unitis a lowermost depth. Since a size of a coding unit corresponding toeach depth decreases as the depth of the maximum coding unit deepens, acoding unit corresponding to an upper depth may include a plurality ofcoding units corresponding to lower depths.

As described above, the image data of the current picture is split intothe maximum coding units according to a maximum size of the coding unit,and each of the maximum coding units may include deeper coding unitsthat are split according to depths. Since the maximum coding unitaccording to an exemplary embodiment is split according to depths, theimage data of a spatial domain included in the maximum coding unit maybe hierarchically classified according to depths.

A maximum depth and a maximum size of a coding unit, which limit thetotal number of times a height and a width of the maximum coding unitare hierarchically split, may be predetermined.

The encoder 120 encodes at least one split region obtained by splittinga region of the maximum coding unit according to depths, and determinesa depth to output finally encoded image data according to the at leastone split region. In other words, the encoder 120 determines a codeddepth by encoding the image data in the deeper coding units according todepths, according to the maximum coding unit of the current picture, andselecting a depth having the least encoding error.

The encoder 120 may output the encoded image data of the coding unitcorresponding to the determined coded depth. Also, the encoder 120 maytransmit information about the determined coded depth to the output unit130 such that the information about the coded depth may be encoded asencoding information.

The image data in the maximum coding unit is encoded based on the deepercoding units corresponding to at least one depth equal to or below themaximum depth, and results of encoding the image data are compared basedon each of the deeper coding units. A depth having the least encodingerror may be selected after comparing encoding errors of the deepercoding units. At least one coded depth may be selected for each maximumcoding unit.

The size of the maximum coding unit is split as a coding unit ishierarchically split according to depths, and as the number of codingunits increases. Also, even if coding units correspond to the same depthin one maximum coding unit, it is determined whether to split each ofthe coding units corresponding to the same depth to a lower depth bymeasuring an encoding error of the image data of each coding unit,separately. Accordingly, even when image data is included in one maximumcoding unit, the image data is split into regions according to thedepths and the encoding errors may differ according to regions in theone maximum coding unit, and thus the coded depths may differ accordingto regions in the image data. Thus, one or more coded depths may bedetermined in one maximum coding unit, and the image data of the maximumcoding unit may be divided according to coding units of at least onecoded depth.

Accordingly, the encoder 120 may determine coding units having a treestructure included in the maximum coding unit. The ‘coding units havinga tree structure’ according to an exemplary embodiment include codingunits corresponding to a depth determined to be the coded depth, fromamong all deeper coding units included in the maximum coding unit. Acoding unit of a coded depth may be hierarchically determined accordingto depths in the same region of the maximum coding unit, and may beindependently determined in different regions. Similarly, a coded depthin a current region may be independently determined from a coded depthin another region.

A maximum depth according to an exemplary embodiment is an index relatedto the number of times splitting is performed from a maximum coding unitto a minimum coding unit. A first maximum depth according to anexemplary embodiment may denote the total number of times splitting isperformed from the maximum coding unit to the minimum coding unit. Asecond maximum depth according to an exemplary embodiment may denote thetotal number of depth levels from the maximum coding unit to the minimumcoding unit. For example, when a depth of the maximum coding unit is 0,a depth of a coding unit, in which the maximum coding unit is splitonce, may be set to 1, and a depth of a coding unit, in which themaximum coding unit is split twice, may be set to 2. Here, if theminimum coding unit is a coding unit in which the maximum coding unit issplit four times, 5 depth levels of depths 0, 1, 2, 3 and 4 exist, andthus the first maximum depth may be set to 4, and the second maximumdepth may be set to 5.

Prediction encoding and transformation may be performed according to themaximum coding unit. The prediction encoding and the transformation arealso performed based on the deeper coding units according to a depthequal to or depths less than the maximum depth, according to the maximumcoding unit.

Since the number of deeper coding units increases whenever the maximumcoding unit is split according to depths, encoding including theprediction encoding and the transformation is performed on all of thedeeper coding units generated as the depth deepens. For convenience ofdescription, the prediction encoding and the transformation will now bedescribed based on a coding unit of a current depth, in a maximum codingunit.

The video encoding apparatus 100 may variously select a size or shape ofa data unit for encoding the image data. In order to encode the imagedata, operations, such as prediction encoding, transformation, andentropy encoding, are performed, and at this time, the same data unitmay be used for all operations or different data units may be used foreach operation.

For example, the video encoding apparatus 100 may select not only acoding unit for encoding the image data, but also a data unit differentfrom the coding unit so as to perform the prediction encoding on theimage data in the coding unit.

In order to perform prediction encoding in the maximum coding unit, theprediction encoding may be performed based on a coding unitcorresponding to a coded depth, i.e., based on a coding unit that is nolonger split to coding units corresponding to a lower depth.Hereinafter, the coding unit that is no longer split and becomes a basicunit for prediction encoding will now be referred to as a ‘predictionunit’. A partition obtained by splitting the prediction unit may includea prediction unit or a data unit obtained by splitting at least one of aheight and a width of the prediction unit.

For example, when a coding unit of 2N×2N (where N is a positive integer)is no longer split and becomes a prediction unit of 2N×2N, a size of apartition may be 2N×2N, 2N×N, N×2N, or N×N. Examples of a partition typeinclude symmetric partitions that are obtained by symmetricallysplitting a height or width of the prediction unit, partitions obtainedby asymmetrically splitting the height or width of the prediction unit,such as 1:n or n:1, partitions that are obtained by geometricallysplitting the prediction unit, and partitions having arbitrary shapes.

A prediction mode of the prediction unit may be at least one of an intramode, a inter mode, and a skip mode. For example, the intra mode or theinter mode may be performed on the partition of 2N×2N, 2N×N, N×2N, orN×N. Also, the skip mode may be performed only on the partition of2N×2N. The encoding is independently performed on one prediction unit ina coding unit, thereby selecting a prediction mode having a leastencoding error.

The video encoding apparatus 100 may also perform the transformation onthe image data in a coding unit based not only on the coding unit forencoding the image data, but also based on a data unit that is differentfrom the coding unit.

In order to perform the transformation in the coding unit, thetransformation may be performed based on a transformation unit having asize smaller than or equal to the coding unit. For example, thetransformation unit for the transformation may include a data unit foran intra mode and a data unit for an inter mode.

Similarly to the coding unit, the transformation unit in the coding unitmay be recursively split into smaller sized regions, so that thetransformation unit may be determined independently in units of regions.Thus, residual data in the coding unit may be divided according to thetransformation units having the tree structure according totransformation depths.

A transformation depth indicating the number of times splitting isperformed to reach the transformation unit by splitting the height andwidth of the coding unit may also be set in the transformation unit. Forexample, in a current coding unit of 2N×2N, a transformation depth maybe 0 when the size of a transformation unit is also 2N×2N, may be 1 whenthe size of the transformation unit is N×N, and may be 2 when the sizeof the transformation unit is N/2×N/2. In other words, transformationunits having a tree structure may be set according to transformationdepths.

Encoding information according to a coded depth uses not onlyinformation about the coded depth, but also information about predictionencoding and transformation. Accordingly, the encoder 120 not onlydetermines a coded depth having a least encoding error, but alsodetermines a partition type in a prediction unit, a prediction modeaccording to prediction units, and a size of a transformation unit fortransformation. For inter prediction, the encoding information accordingto a coded depth may include information related to interpolationfiltering for interpolating sub-pel units.

Also, the encoder 120 may perform transformation by using transformationunits having a tree structure to encode coding units, based on a maximumsplit level of the transformation units, which is previously andrestrictively set in each maximum coding unit or a current coding unit.

In each of deeper coding units according to depths, a basictransformation unit having a size smaller than or equal to a coding unitmay be hierarchically split into transformation units of lowertransformation depths. Transformation units having a tree structure mayinclude a basic transformation unit having a maximum size that iscurrently allowed, and lower-level transformation units relative to amaximum split level that is allowed for coding units.

After performing transformation in each level according to atransformation depth in a current coding unit, the encoder 120 maydetermine transformation units having a tree structure, which areindependent from transformation units of adjacent regions and form ahierarchical structure between transformation units in the same regionaccording to transformation depths.

In other words, transformation units having a tree structure may bedetermined by performing transformation on each coding unit by usingvarious-sized transformation units and then comparing results oftransformation. While a coding unit is being determined, atransformation unit for transforming the coding unit may be determined.Whenever coding units according to each of one or more depths areencoded, transformation units according to each of one or moretransformation depths may be used to perform transformation.

A transformation unit having a least encoding error has to be determinedfor each coding unit. In order to determine a transformation depthhaving a minimum encoding error in a transformation unit, encodingerrors may be measured and compared in all deeper transformation unitsaccording to depths. A transformation unit may be determined as a dataunit for minimizing a transformation error of a coding unit.

Accordingly, since a combination of a deeper coding unit and a deepertransformation unit according to depths, which has a least encodingerror, is individually determined in each region of a maximum codingunit, coding units having a tree structure and transformation unitshaving a tree structure may be determined.

Methods of determining coding units having a tree structure, partitions,and transformation units having a tree structure in a maximum codingunit, according to exemplary embodiments, will be described in detaillater with reference to FIGS. 15 through 25.

The encoder 120 may measure an encoding error of deeper coding unitsaccording to depths by using rate-distortion optimization based onLagrangian multipliers.

The video encoding apparatus 100 may output the image data of themaximum coding unit, which is encoded based on the at least one codeddepth determined by the encoder 120, and information about a coding modeaccording to the coded depth, which is encoded by the output unit 130,in the form of a bitstream.

The information about the coding mode of deeper coding units accordingto depths, which is determined as a picture is encoded based on codingunits, prediction units, and transformation units having a treestructure, may be included in a header, a sequence parameter set (SPS),or a picture parameter set (PPS) of a bitstream.

The encoded image data may be obtained by encoding residual data of animage.

The information about the coding mode according to the coded depth mayinclude information about the coded depth, about the partition type inthe prediction unit, the prediction mode, and the size of thetransformation unit.

The information about the coded depth may be defined by using splitinformation according to depths, which represents whether encoding isperformed on coding units of a lower depth instead of a current depth.If the current depth of the current coding unit is the coded depth,image data in the current coding unit is encoded and output, and thusthe split information may be defined not to split the current codingunit to a lower depth. Alternatively, if the current depth of thecurrent coding unit is not the coded depth, the encoding is performed onthe coding unit of the lower depth, and thus the split information maybe defined to split the current coding unit to obtain the coding unitsof the lower depth.

If the current depth is not the coded depth, encoding is performed onthe coding unit that is split into the coding unit of the lower depth.Since at least one coding unit of the lower depth exists in one codingunit of the current depth, the encoding is repeatedly performed on eachcoding unit of the lower depth, and thus the encoding may be recursivelyperformed for the coding units having the same depth.

Since the coding units having a tree structure are determined for onemaximum coding unit, and information about at least one coding mode isdetermined for a coding unit of a coded depth, information about atleast one coding mode may be determined for one maximum coding unit.Also, a coded depth of the image data of the maximum coding unit may bedifferent according to locations since the image data is hierarchicallysplit according to depths, and thus information about the coded depthand the coding mode may be set for the image data.

Accordingly, the output unit 130 may assign encoding information about acorresponding coded depth and a coding mode to at least one of thecoding unit, the prediction unit, and a minimum unit included in themaximum coding unit.

The minimum unit according to an exemplary embodiment is a rectangulardata unit obtained by splitting the minimum coding unit constituting thelowermost depth by 4. Alternatively, the minimum unit may be a maximumrectangular data unit that may be included in all of the coding units,prediction units, partition units, and transformation units included inthe maximum coding unit.

For example, the encoding information output through the output unit 130may be classified into encoding information according to coding units,and encoding information according to prediction units. The encodinginformation according to the coding units may include the informationabout the prediction mode and about the size of the partitions. Theencoding information according to the prediction units may includeinformation about an estimated direction of an inter mode, about areference image index of the inter mode, about a motion vector, about achroma component of an intra mode, and about an interpolation method ofthe intra mode.

Information about a maximum size of the coding unit defined according topictures, slices, or GOPs, and information about a maximum depth may beinserted into a header, an SPS, or a PPS of a bitstream.

In the video encoding apparatus 100, the deeper coding unit may be acoding unit obtained by dividing a height or width of a coding unit ofan upper depth, which is one layer above, by two. In other words, whenthe size of the coding unit of the current depth is 2N×2N, the size ofthe coding unit of the lower depth is N×N. Also, the coding unit of thecurrent depth having the size of 2N×2N may include maximum 4 of thecoding unit of the lower depth.

Accordingly, the video encoding apparatus 100 may form the coding unitshaving the tree structure by determining coding units having an optimumshape and an optimum size for each maximum coding unit, based on thesize of the maximum coding unit and the maximum depth determinedconsidering characteristics of the current picture. Also, since encodingmay be performed on each maximum coding unit by using any one of variousprediction modes and transformations, an optimum coding mode may bedetermined considering characteristics of the coding unit of variousimage sizes.

Thus, if an image having high resolution or large data amount is encodedin a related art macroblock, a number of macroblocks per pictureexcessively increases. Accordingly, a number of pieces of compressedinformation generated for each macroblock increases, and thus it isdifficult to transmit the compressed information and data compressionefficiency decreases. However, by using the video encoding apparatus100, image compression efficiency may be increased since a coding unitis adjusted while considering characteristics of an image whileincreasing a maximum size of a coding unit while considering a size ofthe image.

The output unit 130 may encode and output encoding informationindicating an encoding method used to encode a video based on codingunits having a tree structure and transformation units having a treestructure. The encoding information may include information aboutvarious coding modes of coding units corresponding to a coded depth, andinformation about the coded depth.

Definitions of various terms, such as a coding unit, a depth, aprediction unit, a transformation unit, and information about variouscoding modes, for various operations of the video decoding apparatus 200are identical to those described with reference to the video encodingapparatus 100.

The receiver 210 receives a bitstream of an encoded video. The receiverand extractor 220 parses the received bitstream. The receiver andextractor 220 extracts encoded picture data for each coding unit fromthe parsed bitstream, wherein the coding units have a tree structureaccording to each maximum coding unit, and outputs the extracted picturedata to the decoder 230. The receiver and extractor 220 may extractinformation about a maximum size of a coding unit of a current picture,from a header, an SPS, or a PPS about the current picture.

Also, the receiver and extractor 220 may extract encoding informationabout the coding units having a tree structure according to each maximumcoding unit, from the parsed bitstream. Information about a coded depthand a coding mode is extracted from the encoding information. Theextracted information about the coded depth and the coding mode isoutput to the decoder 230. In other words, the image data in a bitstreammay be split into the maximum coding unit so that the decoder 230 maydecode the image data for each maximum coding unit.

The information about the coded depth and the coding mode according tothe maximum coding unit may be set for information about at least onecoding unit corresponding to the coded depth, and information about acoding mode may include information about a partition type of acorresponding coding unit corresponding to the coded depth, about aprediction mode, and a size of a transformation unit. For interprediction, information related to interpolation filtering forinterpolating sub-pel units may be extracted from the encodinginformation according to a coded depth. Also, splitting informationaccording to depths may be extracted as the information about the codeddepth.

The information about the coded depth and the coding mode according toeach maximum coding unit extracted by the receiver and extractor 220 isinformation about a coded depth and a coding mode determined to generatea minimum encoding error when an encoder, such as the video encodingapparatus 100, repeatedly performs encoding for each deeper coding unitaccording to depths according to each maximum coding unit. Accordingly,the video decoding apparatus 200 may reconstruct an image by decodingthe image data according to a coded depth and a coding mode thatgenerates the minimum encoding error.

Since encoding information about the coded depth and the coding mode maybe assigned to a predetermined data unit from among a correspondingcoding unit, a prediction unit, and a minimum unit, the receiver andextractor 220 may extract the information about the coded depth and thecoding mode according to the predetermined data units. The predetermineddata units to which the same information about the coded depth and thecoding mode is assigned may be inferred to be the data units included inthe same maximum coding unit.

The decoder 230 may determine at least one coded depth of a currentmaximum coding unit by using split information according to depths. Ifthe split information represents that image data is no longer split inthe current depth, the current depth is a coded depth. Accordingly, thedecoder 230 may decode encoded picture data of at least one coding unitcorresponding to the each coded depth in the current maximum coding unitby using the information about the partition type of the predictionunit, the prediction mode, and the size of the transformation unit foreach coding unit corresponding to the coded depth, and output the imagedata of the current maximum coding unit.

In other words, data units containing the encoding information includingthe same split information may be gathered by observing the encodinginformation set assigned for the predetermined data unit from among thecoding unit, the prediction unit, and the minimum unit, and the gathereddata units may be considered to be one data unit to be decoded by thedecoder 230 in the same coding mode.

The decoder 230 may reconstruct the current picture by decoding theencoded picture data in each maximum coding unit based on theinformation about the coded depth and the coding mode according to themaximum coding units. The partition type, the prediction mode, and thetransformation unit may be read as the coding mode for each coding unitfrom among the coding units having the tree structure included in eachmaximum coding unit. A decoding process may include a predictionincluding intra prediction and motion compensation, and an inversetransformation.

The decoder 230 may perform intra prediction or motion compensationaccording to a partition and a prediction mode of each coding unit,based on the information about the partition type and the predictionmode of the prediction unit of the coding units having a tree structure.

Also, the decoder 230 may read the structure of transformation unitshaving a tree structure and may perform inverse transformation on eachcoding unit based on the transformation units.

The video decoding apparatus 200 may obtain information about at leastone coding unit that generates the minimum encoding error when encodingis recursively performed for each maximum coding unit, and may use theinformation to decode the current picture. In other words, the codingunits having the tree structure determined to be the optimum codingunits in each maximum coding unit may be decoded. Also, the maximum sizeof coding unit is determined in consideration of resolution and anamount of image data.

Accordingly, even if image data has high resolution and a large amountof data, the image data may be efficiently decoded and reconstructed byusing a size of a coding unit and a coding mode, which are adaptivelydetermined according to characteristics of the image data, by usinginformation about an optimum coding mode received from an encoder.

FIG. 15 is a diagram for describing a concept of coding units accordingto an exemplary embodiment.

A size of a coding unit may be expressed in width×height, and may be64×64, 32×32, 16×16, and 8×8. A coding unit of 64×64 may be split intopartitions of 64×64, 64×32, 32×64, or 32×32, a coding unit of 32×32 maybe split into partitions of 32×32, 32×16, 16×32, or 16×16, a coding unitof 16×16 may be split into partitions of 16×16, 16×8, 8×16, or 8×8, anda coding unit of 8×8 may be split into partitions of 8×8, 8×4, 4×8, or4×4.

In video data 310, a resolution is 1920×1080, a maximum size of a codingunit is 64, and a maximum depth is 2. In video data 320, a resolution is1920×1080, a maximum size of a coding unit is 64, and a maximum depth is3. In video data 330, a resolution is 352×288, a maximum size of acoding unit is 16, and a maximum depth is 1. The maximum depth shown inFIG. 15 denotes a total number of splits from a maximum coding unit to aminimum decoding unit.

If a resolution is high or a data amount is large, a maximum size of acoding unit may be large so as to not only increase encoding efficiencybut also to accurately reflect characteristics of an image. Accordingly,the maximum size of the coding unit of the video data 310 and 320 havingthe higher resolution than the video data 330 may be 64.

Since the maximum depth of the video data 310 is 2, coding units 315 ofthe vide data 310 may include a maximum coding unit having a long axissize of 64, and coding units having long axis sizes of 32 and 16 sincedepths are deepened to two layers by splitting the maximum coding unittwice. Meanwhile, since the maximum depth of the video data 330 is 1,coding units 335 of the video data 330 may include a maximum coding unithaving a long axis size of 16, and coding units having a long axis sizeof 8 since depths are deepened to one layer by splitting the maximumcoding unit once.

Since the maximum depth of the video data 320 is 3, coding units 325 ofthe video data 320 may include a maximum coding unit having a long axissize of 64, and coding units having long axis sizes of 32, 16, and 8since the depths are deepened to 3 layers by splitting the maximumcoding unit three times. As a depth deepens, detailed information may beprecisely expressed.

FIG. 16 is a block diagram of an image encoder 400 based on codingunits, according to an exemplary embodiment.

The image encoder 400 performs operations of the encoder 120 of thevideo encoding apparatus 100 to encode image data. In other words, anintra predictor 410 performs intra prediction on coding units in anintra mode, from among a current frame 405, and a motion estimator 420and a motion compensator 425 performs inter estimation and motioncompensation on coding units in an inter mode from among the currentframe 405 by using the current frame 405, and a reference frame 495.

In order to precisely perform motion estimation by using referencepixels in sub-pel units, the motion estimator 420 and the motioncompensator 425 may generate pixels in sub-pel units by interpolatingpixels in integer-pel units. An interpolation filter for generatingpixels in sub-pel units may be the smoothing interpolation filterdescribed above in relation to FIGS. 1 and 13A.

Data output from the intra predictor 410, the motion estimator 420, andthe motion compensator 425 is output as a quantized transformationcoefficient through a transformer 430 and a quantizer 440. The quantizedtransformation coefficient is reconstructed as data in a spatial domainthrough an inverse quantizer 460 and an inverse transformer 470, and thereconstructed data in the spatial domain is output as the referenceframe 495 after being post-processed through a deblocking filter 480 anda loop filter 490. The quantized transformation coefficient may beoutput as a bitstream 455 through an entropy encoder 450.

In order for the image encoder 400 to be applied in the video encodingapparatus 100, all elements of the image encoder 400, i.e., the intrapredictor 410, the motion estimator 420, the motion compensator 425, thetransformer 430, the quantizer 440, the entropy encoder 450, the inversequantizer 460, the inverse transformer 470, the deblocking filter 480,and the loop filter 490, have to perform operations based on each codingunit from among coding units having a tree structure while consideringthe maximum depth of each maximum coding unit.

Specifically, the intra predictor 410, the motion estimator 420, and themotion compensator 425 have to determine partitions and a predictionmode of each coding unit from among the coding units having a treestructure while considering the maximum size and the maximum depth of acurrent maximum coding unit, and the transformer 430 has to determinethe size of the transformation unit in each coding unit from among thecoding units having a tree structure.

FIG. 17 is a block diagram of an image decoder 500 based on codingunits, according to an exemplary embodiment.

A parser 510 parses encoded image data to be decoded and informationabout encoding required for decoding from a bitstream 505. The encodedimage data is output as inversely quantized data through an entropydecoder 520 and an inverse quantizer 530, and the inversely quantizeddata is reconstructed to image data in a spatial domain through aninverse transformer 540.

An intra predictor 550 performs intra prediction on coding units in anintra mode with respect to the image data in the spatial domain, and amotion compensator 560 performs motion compensation on coding units inan inter mode by using a reference frame 585.

In order to precisely perform motion estimation by using referencepixels in sub-pel units, the motion compensator 560 may generate pixelsin sub-pel units by interpolating pixels in integer-pel units. Aninterpolation filter for generating pixels in sub-pel units may be thesmoothing interpolation filter described above in relation to FIGS. 2and 13B.

The image data in the spatial domain, which passed through the intrapredictor 550 and the motion compensator 560, may be output as areconstructed frame 595 after being post-processed through a deblockingfilter 570 and a loop filter 580. Also, the image data that ispost-processed through the deblocking filter 570 and the loop filter 580may be output as the reference frame 585.

In order to decode the image data in the decoder 230 of the videodecoding apparatus 200, the image decoder 500 may perform operationsthat are performed after the parser 510.

In order for the image decoder 500 to be applied in the video decodingapparatus 200, all elements of the image decoder 500, i.e., the parser510, the entropy decoder 520, the inverse quantizer 530, the inversetransformer 540, the intra predictor 550, the motion compensator 560,the deblocking filter 570, and the loop filter 580, have to performoperations based on coding units having a tree structure for eachmaximum coding unit.

Specifically, the intra prediction 550 and the motion compensator 560have to determine partitions and a prediction mode for each of thecoding units having a tree structure, and the inverse transformer 540has to determine a size of a transformation unit for each coding unit.

FIG. 18 is a diagram illustrating deeper coding units according todepths, and partitions, according to an exemplary embodiment.

The video encoding apparatus 100 and the video decoding apparatus 200use hierarchical coding units so as to consider characteristics of animage. A maximum height, a maximum width, and a maximum depth of codingunits may be adaptively determined according to the characteristics ofthe image, or may be differently set by a user. Sizes of deeper codingunits according to depths may be determined according to thepredetermined maximum size of the coding unit.

In a hierarchical structure 600 of coding units, according to anexemplary embodiment, the maximum height and the maximum width of thecoding units are each 64, and the maximum depth is 3. In this case, themaximum depth denotes the total number of times splitting is performedfrom a maximum coding unit to a minimum coding unit. Since a depthdeepens along a vertical axis of the hierarchical structure 600, aheight and a width of the deeper coding unit are each split. Also, aprediction unit and partitions, which are bases for prediction encodingof each deeper coding unit, are shown along a horizontal axis of thehierarchical structure 600.

In other words, a coding unit 610 is a maximum coding unit in thehierarchical structure 600, wherein a depth is 0 and a size, i.e., aheight by width, is 64×64. The depth deepens along the vertical axis,and a coding unit 620 having a size of 32×32 and a depth of 1, a codingunit 630 having a size of 16×16 and a depth of 2, and a coding unit 640having a size of 8×8 and a depth of 3 exist. The coding unit 640 havingthe size of 8×8 and the depth of 3 is a minimum coding unit.

The prediction unit and the partitions of a coding unit are arrangedalong the horizontal axis according to each depth. In other words, ifthe coding unit 610 having the size of 64×64 and the depth of 0 is aprediction unit, the prediction unit may be split into partitionsincluded in the coding unit 610, i.e., a partition 610 having a size of64×64, partitions 612 having the size of 64×32, partitions 614 havingthe size of 32×64, or partitions 616 having the size of 32×32.

Similarly, a prediction unit of the coding unit 620 having the size of32×32 and the depth of 1 may be split into partitions included in thecoding unit 620, i.e., a partition 620 having a size of 32×32,partitions 622 having a size of 32×16, partitions 624 having a size of16×32, or partitions 626 having a size of 16×16.

Similarly, a prediction unit of the coding unit 630 having the size of16×16 and the depth of 2 may be split into partitions included in thecoding unit 630, i.e., a partition having a size of 16×16, partitions632 having a size of 16×8, partitions 634 having a size of 8×16, orpartitions 636 having a size of 8×8.

Similarly, a prediction unit of the coding unit 640 having the size of8×8 and the depth of 3 may be split into partitions included in thecoding unit 640, i.e., a partition having a size of 8×8, partitions 642having a size of 8×4, partitions 644 having a size of 4×8, or partitions646 having a size of 4×4.

In order to determine the at least one coded depth of the coding unitsconstituting the maximum coding unit 610, the encoder 120 of the videoencoding apparatus 100 performs encoding for coding units correspondingto each depth included in the maximum coding unit 610.

A number of deeper coding units according to depths including data inthe same range and the same size increases as the depth deepens. Forexample, four coding units corresponding to a depth of 2 are required tocover data that is included in one coding unit corresponding to a depthof 1. Accordingly, in order to compare encoding results of the same dataaccording to depths, the coding unit corresponding to the depth of 1 andfour coding units corresponding to the depth of 2 are each encoded.

In order to perform encoding for a current depth from among the depths,a least encoding error may be selected for the current depth byperforming encoding for each prediction unit in the coding unitscorresponding to the current depth, along the horizontal axis of thehierarchical structure 600. Alternatively, the minimum encoding errormay be searched for by comparing the least encoding errors according todepths, by performing encoding for each depth as the depth deepens alongthe vertical axis of the hierarchical structure 600. A depth and apartition having the minimum encoding error in the coding unit 610 maybe selected as the coded depth and a partition type of the coding unit610.

FIG. 19 is a diagram for describing a relationship between a coding unit710 and transformation units 720, according to an exemplary embodiment.

The video encoding apparatus 100 or the video decoding apparatus 200encodes or decodes an image according to coding units having sizessmaller than or equal to a maximum coding unit for each maximum codingunit. Sizes of transformation units for transformation during encodingmay be selected based on data units that are not larger than acorresponding coding unit.

For example, in the video encoding apparatus 100 or the video decodingapparatus 200, if a size of the coding unit 710 is 64×64, transformationmay be performed by using the transformation units 720 having a size of32×32.

Also, data of the coding unit 710 having the size of 64×64 may beencoded by performing the transformation on each of the transformationunits having the size of 32×32, 16×16, 8×8, and 4×4, which are smallerthan 64×64, and then a transformation unit having the least coding errormay be selected.

FIG. 20 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment.

The output unit 130 of the video encoding apparatus 100 may encode andtransmit information 800 about a partition type, information 810 about aprediction mode, and information 820 about a size of a transformationunit for each coding unit corresponding to a coded depth, as informationabout a coding mode.

The information 800 represents information about a shape of a partitionobtained by splitting a prediction unit of a current coding unit,wherein the partition is a data unit for prediction encoding the currentcoding unit. For example, a current coding unit CU_(—)0 having a size of2N×2N may be split into any one of a partition 802 having a size of2N×2N, a partition 804 having a size of 2N×N, a partition 806 having asize of N×2N, and a partition 808 having a size of N×N. Here, theinformation 800 about a partition type is set to indicate one of thepartition 804 having a size of 2N×N, the partition 806 having a size ofN×2N, and the partition 808 having a size of N×N

The information 810 represents a prediction mode of each partition. Forexample, the information 810 may indicate a mode of prediction encodingperformed on a partition represented by the information 800, i.e., anintra mode 812, an inter mode 814, or a skip mode 816.

The information 820 represents a transformation unit to be based on whentransformation is performed on a current coding unit. For example, thetransformation unit may be a first intra transformation unit 822, asecond intra transformation unit 824, a first inter transformation unit826, or a second inter transformation unit 828.

The receiver and extractor 220 of the video decoding apparatus 200 mayextract and use the information 800, 810, and 820 for decoding,according to each deeper coding unit

FIG. 21 is a diagram of deeper coding units according to depths,according to an exemplary embodiment.

Split information may be used to indicate a change of a depth. The spiltinformation represents whether a coding unit of a current depth is splitinto coding units of a lower depth.

A prediction unit 910 for prediction encoding a coding unit 900 having adepth of 0 and a size of 2N_(—)0×2N_(—)0 may include partitions of apartition type 912 having a size of 2N_(—)0×2N_(—)0, a partition type914 having a size of 2N_(—)0×N_(—)0, a partition type 916 having a sizeof N_(—)0×2N_(—)0, and a partition type 918 having a size ofN_(—)0×N_(—)0. FIG. 9 only illustrates the partition types 912 through918 which are obtained by symmetrically splitting the prediction unit910, but a partition type is not limited thereto, and the partitions ofthe prediction unit 910 may include asymmetric partitions, partitionshaving a predetermined shape, and partitions having a geometrical shape.

Prediction encoding is repeatedly performed on one partition having asize of 2N_(—)0×2N_(—)0, two partitions having a size of 2N_(—)0×N_(—)0,two partitions having a size of N_(—)0×2N_(—)0, and four partitionshaving a size of N_(—)0×N_(—)0, according to each partition type. Theprediction encoding in an intra mode and an inter mode may be performedon the partitions having the sizes of 2N_(—)0×2N_(—)0, N_(—)0×2N_(—)0,2N_(—)0×N_(—)0, and N_(—)0×N_(—)0. The prediction encoding in a skipmode is performed only on the partition having the size of2N_(—)0×2N_(—)0.

Errors of encoding including the prediction encoding in the partitiontypes 912 through 918 are compared, and the least encoding error isdetermined among the partition types. If an encoding error is smallestin one of the partition types 912 through 916, the prediction unit 910may not be split into a lower depth.

If the encoding error is the smallest in the partition type 918, a depthis changed from 0 to 1 to split the partition type 918 in operation 920,and encoding is repeatedly performed on coding units 930 having a depthof 2 and a size of N_(—)0×N_(—)0 to search for a minimum encoding error.

A prediction unit 940 for prediction encoding the coding unit 930 havinga depth of 1 and a size of 2N_(—)1×2N_(—)1 (=N_(—)0×N_(—)0) may includepartitions of a partition type 942 having a size of 2N_(—)1×2N_(—)1, apartition type 944 having a size of 2N_(—)1×N_(—)1, a partition type 946having a size of N_(—)1×2N_(—)1, and a partition type 948 having a sizeof N_(—)1×N_(—)1.

If an encoding error is the smallest in the partition type 948, a depthis changed from 1 to 2 to split the partition type 948 in operation 950,and encoding is repeatedly performed on coding units 960, which have adepth of 2 and a size of N_(—)2×N_(—)2 to search for a minimum encodingerror.

When a maximum depth is d, deeper coding units according to depths maybe assigned up to when a depth becomes d−1, and split information may beencoded as up to when a depth is one of 0 to d−2. In other words, whenencoding is performed up to when the depth is d−1 after a coding unitcorresponding to a depth of d−2 is split in operation 970, a predictionunit 990 for prediction encoding a coding unit 980 having a depth of d−1and a size of 2N_(d−1)×2N_(d−1) may include partitions of a partitiontype 992 having a size of 2N_(d−1)×2N_(d−1), a partition type 994 havinga size of 2N_(d−1)×N_(d−1), a partition type 996 having a size ofN_(d−1)×2N_(d−1), and a partition type 998 having a size ofN_(d−1)×N_(d−1).

Prediction encoding may be repeatedly performed on one partition havinga size of 2N_(d−1)×2N_(d−1), two partitions having a size of2N_(d−1)×N_(d−1), two partitions having a size of N_(d−1)×2N_(d−1), fourpartitions having a size of N_(d−1)×N_(d−1) from among the partitiontypes 992 through 998 so as to search for a partition type having aminimum encoding error.

Even when the partition type 998 has the minimum encoding error, since amaximum depth is d, a coding unit CU_(d−1) having a depth of d−1 is nolonger split to a lower depth, and a coded depth for the coding unitsconstituting a current maximum coding unit 900 is determined to be d−1and a partition type of the current maximum coding unit 900 may bedetermined to be N_(d−1)×N_(d−1). Also, since the maximum depth is d anda minimum coding unit 980 having a lowermost depth of d−1 is no longersplit to a lower depth, split information for the minimum coding unit980 is not set.

A data unit 999 may be a ‘minimum unit’ for the current maximum codingunit. A minimum unit according to an exemplary embodiment may be arectangular data unit obtained by splitting a minimum coding unit 980 by4. By performing the encoding repeatedly, the video encoding apparatus100 may select a depth having the least encoding error by comparingencoding errors according to depths of the coding unit 900 to determinea coded depth, and set a corresponding partition type and a predictionmode as a coding mode of the coded depth.

As such, the minimum encoding errors according to depths are compared inall of the depths of 1 through d, and a depth having the least encodingerror may be determined as a coded depth. The coded depth, the partitiontype of the prediction unit, and the prediction mode may be encoded andtransmitted as information about a coding mode. Also, since a codingunit is split from a depth of 0 to a coded depth, only split informationof the coded depth is set to 0, and split information of depthsexcluding the coded depth is set to 1.

The receiver and extractor 220 of the video decoding apparatus 200 mayextract and use the information about the coded depth and the predictionunit of the coding unit 900 to decode the partition 912. The videodecoding apparatus 200 may determine a depth, in which split informationis 0, as a coded depth by using split information according to depths,and use information about a coding mode of the corresponding depth fordecoding.

FIGS. 22 through 24 are diagrams for describing a relationship betweencoding units 1010, prediction units 1060, and transformation units 1070,according to an exemplary embodiment.

The coding units 1010 are coding units having a tree structure,corresponding to coded depths determined by the video encoding apparatus100, in a maximum coding unit. The prediction units 1060 are partitionsof prediction units of each of the coding units 1010, and thetransformation units 1070 are transformation units of each of the codingunits 1010.

When a depth of a maximum coding unit is 0 in the coding units 1010,depths of coding units 1012 and 1054 are 1, depths of coding units 1014,1016, 1018, 1028, 1050, and 1052 are 2, depths of coding units 1020,1022, 1024, 1026, 1030, 1032, and 1048 are 3, and depths of coding units1040, 1042, 1044, and 1046 are 4.

In the prediction units 1060, some coding units 1014, 1016, 1022, 1032,1048, 1050, 1052, and 1054 are obtained by splitting the coding units inthe coding units 1010. In other words, partition types in the codingunits 1014, 1022, 1050, and 1054 have a size of 2N×N, partition types inthe coding units 1016, 1048, and 1052 have a size of N×2N, and apartition type of the coding unit 1032 has a size of N×N. Predictionunits and partitions of the coding units 1010 are smaller than or equalto each coding unit.

Transformation or inverse transformation is performed on image data ofthe coding unit 1052 in the transformation units 1070 in a data unitthat is smaller than the coding unit 1052. Also, the coding units 1014,1016, 1022, 1032, 1048, 1050, and 1052 in the transformation units 1070are different from those in the prediction units 1060 in terms of sizesand shapes. In other words, the video encoding and decoding apparatuses100 and 200 may perform intra prediction, motion estimation, motioncompensation, transformation, and inverse transformation individually ona data unit in the same coding unit.

Accordingly, encoding is recursively performed on each of coding unitshaving a hierarchical structure in each region of a maximum coding unitto determine an optimum coding unit, and thus coding units having arecursive tree structure may be obtained. Encoding information mayinclude split information about a coding unit, information about apartition type, information about a prediction mode, and informationabout a size of a transformation unit. Table 1 shows the encodinginformation that may be set by the video encoding and decodingapparatuses 100 and 200.

TABLE 1 Split Information 0 Split (Encoding on Coding Unit having Sizeof 2N × 2N and Current Depth of d) Information 1 Prediction PartitionSize of Repeatedly Mode Type Transformation Unit Encode Intra SymmetricAsymmetric Split Split Information Coding Units Inter PartitionPartition Type Information 0 1 of having Lower Skip Type 2N × nU ofTransformation Depth of d + 1 (Only 2N × 2N 2N × nD Transformation Unit2N × 2N) 2N × N  nL × 2N Unit N × N  N × 2N nR × 2N 2N × 2N (Symmetric N× N Partition Type) N/2 × N/2 (Asymmetric Partition Type)

The output unit 130 of the video encoding apparatus 100 may output theencoding information about the coding units having a tree structure, andthe receiver and extractor 220 of the video decoding apparatus 200 mayextract the encoding information about the coding units having a treestructure from a received bitstream.

Split information represents whether a current coding unit is split intocoding units of a lower depth. If split information of a current depth dis 0, a depth, in which a current coding unit is no longer split into alower depth, is a coded depth, and thus information about a partitiontype, prediction mode, and a size of a transformation unit may bedefined for the coded depth. If the current coding unit is further splitaccording to the split information, encoding is independently performedon four split coding units of a lower depth.

A prediction mode may be one of an intra mode, an inter mode, and a skipmode. The intra mode and the inter mode may be defined in all partitiontypes, and the skip mode is defined only in a partition type having asize of 2N×2N.

The information about the partition type may indicate symmetricpartition types having sizes of 2N×2N, 2N×N, N×2N, and N×N, which areobtained by symmetrically splitting a height or a width of a predictionunit, and asymmetric partition types having sizes of 2N×nU, 2N×nD,nL×2N, and nR×2N, which are obtained by asymmetrically splitting theheight or width of the prediction unit. The asymmetric partition typeshaving the sizes of 2N×nU and 2N×nD may be respectively obtained bysplitting the height of the prediction unit in 1:3 and 3:1, and theasymmetric partition types having the sizes of nL×2N and nR×2N may berespectively obtained by splitting the width of the prediction unit in1:3 and 3:1

The size of the transformation unit may be set to be two types in theintra mode and two types in the inter mode. In other words, if splitinformation of the transformation unit is 0, the size of thetransformation unit may be 2N×2N, which is the size of the currentcoding unit. If split information of the transformation unit is 1, thetransformation units may be obtained by splitting the current codingunit. Also, if a partition type of the current coding unit having thesize of 2N×2N is a symmetric partition type, a size of a transformationunit may be N×N, and if the partition type of the current coding unit isan asymmetric partition type, the size of the transformation unit may beN/2×N/2.

The encoding information about coding units having a tree structure mayinclude at least one of a coding unit corresponding to a coded depth, aprediction unit, and a minimum unit. The coding unit corresponding tothe coded depth may include at least one of a prediction unit and aminimum unit containing the same encoding information.

Accordingly, it is determined whether adjacent data units are includedin the same coding unit corresponding to the coded depth by comparingencoding information of the adjacent data units. Also, a correspondingcoding unit corresponding to a coded depth is determined by usingencoding information of a data unit, and thus a distribution of codeddepths in a maximum coding unit may be determined.

Accordingly, if a current coding unit is predicted based on encodinginformation of adjacent data units, encoding information of data unitsin deeper coding units adjacent to the current coding unit may bedirectly referred to and used.

Alternatively, if a current coding unit is predicted based on encodinginformation of adjacent data units, data units adjacent to the currentcoding unit are searched using encoded information of the data units,and the searched adjacent coding units may be referred to for predictingthe current coding unit.

FIG. 25 is a diagram for describing a relationship between a codingunit, a prediction unit or a partition, and a transformation unit,according to coding mode information of Table 1.

A maximum coding unit 1300 includes coding units 1302, 1304, 1306, 1312,1314, 1316, and 1318 of coded depths. Here, since the coding unit 1318is a coding unit of a coded depth, split information may be set to 0.Information about a partition type of the coding unit 1318 having a sizeof 2N×2N may be set to be one of a partition type 1322 having a size of2N×2N, a partition type 1324 having a size of 2N×N, a partition type1326 having a size of N×2N, a partition type 1328 having a size of N×N,a partition type 1332 having a size of 2N×nU, a partition type 1334having a size of 2N×nD, a partition type 1336 having a size of nL×2N,and a partition type 1338 having a size of nR×2N.

Split information (TU size flag) of a transformation unit is a sort of atransformation index, and the size of a transformation unitcorresponding to the transformation index may vary according to aprediction unit type or a partition type of a coding unit.

For example, when the partition type is set to be symmetric, i.e., thepartition type 1322, 1324, 1326, or 1328, a transformation unit 1342having a size of 2N×2N is set if a TU size flag is 0, and atransformation unit 1344 having a size of N×N is set if a TU size flagis 1.

When the partition type is set to be asymmetric, i.e., the partitiontype 1332, 1334, 1336, or 1338, a transformation unit 1352 having a sizeof 2N×2N is set if a TU size flag is 0, and a transformation unit 1354having a size of N/2×N/2 is set if a TU size flag is 1.

Referring to FIG. 21, the TU size flag is a flag having a value or 0 or1, but the TU size flag is not limited to 1 bit, and a transformationunit may be hierarchically split having a tree structure while the TUsize flag increases from 0. The TU size flag may be used as an exampleof a transformation index.

In this case, the size of a transformation unit that has been actuallyused may be expressed by using a TU size flag of a transformation unit,according to an exemplary embodiment, together with a maximum size andminimum size of the transformation unit. According to an exemplaryembodiment, the video encoding apparatus 100 is capable of encodingmaximum transformation unit size information, minimum transformationunit size information, and a maximum TU size flag. The encoding resultof the maximum transformation unit size information, the minimumtransformation unit size information, and the maximum TU size flag maybe inserted into an SPS. According to an exemplary embodiment, the videodecoding apparatus 200 may decode video by using the maximumtransformation unit size information, the minimum transformation unitsize information, and the maximum TU size flag.

For example, (α) if the size of a current coding unit is 64×64 and amaximum transformation unit size is 32×32, then (a-1) the size of atransformation unit may be 32×32 when a TU size flag is 0, (a-2) may be16×16 when the TU size flag is 1, and (a-3) may be 8×8 when the TU sizeflag is 2.

As another example, (b) if the size of the current coding unit is 32×32and a minimum transformation unit size is 32×32, then (b-1) the size ofthe transformation unit may be 32×32 when the TU size flag is 0. Here,the TU size flag cannot be set to a value other than 0, since the sizeof the transformation unit cannot be less than 32×32.

As another example, (c) if the size of the current coding unit is 64×64and a maximum TU size flag is 1, then the TU size flag may be 0 or 1.Here, the TU size flag cannot be set to a value other than 0 or 1.

Thus, if it is defined that the maximum TU size flag is‘MaxTransformSizelndex’, a minimum transformation unit size is‘MinTransformSize’, and a root transformation unit size is ‘RootTuSize’when the TU size flag is 0, then a current minimum transformation unitsize ‘CurrMinTuSize’ that can be determined in a current coding unit,may be defined by Equation (20):CurrMinTuSize=max(MinTransformSize,RootTuSize/(2^MaxTransformSizeIndex))  (20)

Compared to the current minimum transformation unit size ‘CurrMinTuSize’that can be determined in the current coding unit, the roottransformation unit size ‘RootTuSize’ may denote a maximumtransformation unit size that may be selected in the system. In Equation(20), ‘RootTuSize/(2^MaxTransformSizeIndex)’ denotes a transformationunit size when the root transformation unit size ‘RootTuSize’ is split anumber of times corresponding to the maximum TU size flag, and‘MinTransformSize’ denotes a minimum transformation size. Thus, asmaller value from among ‘RootTuSize/(2^MaxTransformSizeIndex)’ and‘MinTransformSize’ may be the current minimum transformation unit size‘CurrMinTuSize’ that may be determined in the current coding unit.

According to an exemplary embodiment, the root transformation unit size‘RootTuSize’ may vary according to the type of a prediction mode.

For example, if a current prediction mode is an inter mode, then‘RootTuSize’ may be determined by using Equation (21) below. In Equation(21), ‘MaxTransformSize’ denotes a maximum transformation unit size, and‘PUSize’ denotes a current prediction unit size.RootTuSize=min(MaxTransformSize,PUSize)  (21)

That is, if the current prediction mode is the inter mode, the roottransformation unit size ‘RootTuSize’ when the TU size flag is 0 may bea smaller value from among the maximum transformation unit size and thecurrent prediction unit size.

If a prediction mode of a current partition unit is an intra mode,‘RootTuSize’ may be determined by using Equation (22) below. In Equation(22), ‘PartitionSize’ denotes the size of the current partition unit.RootTuSize=min(MaxTransformSize,PartitionSize)  (22)

That is, if the current prediction mode is the intra mode, the roottransformation unit size ‘RootTuSize’ may be a smaller value from amongthe maximum transformation unit size and the size of the currentpartition unit.

However, the current maximum transformation unit size that variesaccording to the type of a prediction mode in a partition unit, the roottransformation unit size ‘RootTuSize’, is just an example and one ormore other exemplary embodiments are not limited thereto.

FIG. 26 is a flowchart of a video encoding method using a smoothinginterpolation filter based on coding units having a tree structure,according to an exemplary embodiment.

In operation 2610, in order to encode a current picture of an inputvideo, the current picture is split into at least one maximum codingunit. Each of at least one split region, which is obtained by splittinga region of each maximum coding unit according to depths, may beencoded. In order to encode each split region according to depths,transformation and quantization are performed on an inter predictionresult based on sub-pel-unit interpolation, and intra prediction.

Here, a split depth for outputting a final encoding result according tothe at least one split region may be determined by comparing results ofencoding split regions according to depths, and coding units included ina current maximum coding unit and having a tree structure may bedetermined. Like the coding units having a tree structure,transformation units having a tree structure may be determined. In otherwords, as an encoding result of a picture, like the determined codingunits having a tree structure, an encoding result of the transformationunits having a tree structure may be output as encoded data of thepicture.

Inter prediction may be performed on each prediction unit or partitionof the coding unit. Motion of a current prediction unit or partition maybe predicted with reference to pixels generated by performingsub-pel-unit interpolation. From among interpolation filters forgenerating a sub-pel-unit pixel value, an interpolation filter isdifferently selected based on a sub-pel-unit interpolation location anda smoothness. In order to efficiently perform image interpolation,interpolation filter coefficients may be selectively determined.

From among interpolation filter coefficients previously stored inmemory, a desired interpolation filter may be selected according to asub-pel-unit interpolation location, a smoothness, the number of filtertaps, a bit depth, a scaling factor, a basis function of interpolationfiltering based on transformation, and a color component, andinterpolation may be performed to generate the sub-pel-unit pixel value.

In operation 2620, image data obtained as the final encoding resultaccording to the at least one split region of each maximum coding unit,and information about the coded depth and the coding mode are output asa bitstream.

The information about the coding mode may include information about thecoded depth or split information, information about a partition type ofa prediction unit, information about a prediction mode, and informationabout a tree structure of transformation units. The encoding informationmay include information about an interpolation filter used to performsub-pel-unit prediction encoding. The encoded information about thecoding mode may be transmitted to a decoding apparatus together with theencoded image data.

FIG. 27 is a flowchart of a video decoding method using a smoothinginterpolation filter based on coding units having a tree structure,according to an exemplary embodiment.

In operation 2710, a bitstream of an encoded video is received andparsed.

In operation 2720, encoded image data of a current picture assigned to amaximum coding unit, and information about a coded depth and a codingmode according to maximum coding units are extracted from the parsedbitstream. Information about an interpolation filter required to performsub-pel-unit motion compensation may be extracted from the encodinginformation.

Information about the coded depth and the coding mode may be extractedfrom the encoding information. According to the information about thecoded depth and the coding mode, a maximum coding unit may be split intocoding units having a tree structure. Also, according to informationabout a tree structure of transformation units included in the extractedinformation, transformation units having a tree structure according totransformation depths in the coding units may be determined.

In operation 2730, by using the information about the coded depth andthe coding mode according to each maximum coding unit, image data ofeach maximum coding unit may be decoded based on the coding units havinga tree structure, prediction units, and the transformation units havinga tree structure. Since a current coding unit is decoded based on theinformation about the coded depth and the coding mode, a current codingunit may be inversely transformed by using a transformation unitdetermined from among the transformation units having a tree structure.

Encoded picture data may be decoded by performing various decodingoperations such as motion compensation and intra prediction on eachprediction unit or partition of the coding unit based on the codingmode.

Specifically, if encoded residual data and reference data are extractedbased on pixels interpolated in a sub-pel unit, motion compensation on acurrent prediction unit or a current partition may be performed based onthe pixels interpolated in sub-pel units. From among interpolationfilters for generating a sub-pel-unit pixel value, an interpolationfilter may be differently selected based on a sub-pel-unit interpolationlocation and a smoothness.

In order to efficiently perform image interpolation, interpolationfilter coefficients may be selectively determined. From amonginterpolation filter coefficients previously stored in memory, a desiredinterpolation filter may be selected according to a sub-pel-unitinterpolation location, a smoothness, the number of filter taps, a bitdepth, a scaling factor, a basis function of interpolation filteringbased on transformation, and a color component, and interpolation may beperformed to generate the sub-pel-unit pixel value.

A reference picture and a reference region are determined by using thereference data, and the sub-pel-unit pixel value may be generated byperforming interpolation filtering on two or more integer-pel-unitreference pixels of the reference picture. Motion compensation may beperformed on the current prediction unit or the current partition bycombining the generated sub-pel-unit pixel value and the residual data,and thus prediction decoding may be performed.

Since each maximum coding unit is decoded, image data in a spatialdomain may be reconstructed, and a picture and a video that is a picturesequence may be reconstructed. The reconstructed video may be reproducedby a reproduction apparatus, may be stored in a storage medium, or maybe transmitted in a network.

Exemplary embodiments may be written as computer programs and may beimplemented in general-use digital computers that execute the programsusing a computer readable recording medium. Examples of the computerreadable recording medium include magnetic storage media (e.g., ROM,floppy disks, hard disks, etc.) and optical recording media (e.g.,CD-ROMs, or DVDs). Moreover, it is understood that in exemplaryembodiments, one or more units of the above-described apparatuses caninclude circuitry, a processor, a microprocessor, etc., and may executea computer program stored in a computer-readable medium.

While exemplary embodiments have been particularly shown and describedabove, it will be understood by those of ordinary skill in the art thatvarious changes in form and details may be made therein withoutdeparting from the spirit and scope of the invention as defined by theappended claims. The exemplary embodiments should be considered in adescriptive sense only and not for purposes of limitation. Therefore,the scope of the invention is defined not by the detailed description ofexemplary embodiments but by the appended claims, and all differenceswithin the scope will be construed as being included in the presentinvention.

What is claimed is:
 1. A method of motion compensation, the methodcomprising: determining, in a luma reference picture, a luma referenceblock for prediction of a current block, by using a luma motion vectorof the current block; generating a luma sample of a 2/4-pixel locationincluded in the luma reference block by applying an 8-tap filter to lumasamples of a integer pixel location of the luma reference picture;determining, in a chroma reference picture, a chroma reference block forprediction of a current block, by using a chroma motion vector of thecurrent block; and generating at least one chroma sample of at least oneof ⅛, 2/8 and ⅜-pixel locations included in the chroma reference blockby applying a 4-tap filter to chroma samples of a integer pixel locationof the chroma reference picture, wherein the 8-tap filter includes afirst filter coefficient, a second filter coefficient, a third filtercoefficient, a fourth filter coefficient, a fifth filter coefficient, asixth filter coefficient, a seventh filter coefficient, and an eighthfilter coefficient, a value of the first filter coefficient is equal toa value of the eighth filter coefficient, a value of the second filtercoefficient is equal to a value of the seventh filter coefficient, avalue of the third filter coefficient is equal to a value of the sixthfilter coefficient, a value of the fourth filter coefficeint is equal toa value of the fifth filter coefficient, and the 4-tap filter includesfour filter coefficients for interpolation.
 2. The method of claim 1,wherein the generating of the luma sample comprises: scaling the lumasample generated by applying the 8-tap filter by using a luma scalingfactor that a sum of coefficients of the 8-tap filter is
 1. 3. Themethod of claim 1, wherein the generating of the at least one chromasample comprises scaling the chroma sample generated by applying the4-tap filter by using a chroma scaling factor that a sum of coefficientsof the 4-tap filter is 1.